All Content
Timespan
explore our new search
Testing JS Changes in Model Driven Apps Without Deployment
Image Source: Shutterstock.com
Model-Driven App
Sep 30, 2023 7:37 AM

Testing JS Changes in Model Driven Apps Without Deployment

by HubSite 365 about Temmy Wahyu Raharjo

Citizen DeveloperModel-Driven AppM365 Hot News

Learn how to test modifications in JavaScript coding effortlessly without deploying using browser features, as Microsoft Dynamics 365 expert unveils.

A Detailed Look into Model-Driven App Testing using JavaScript Changes

The blog post by Temmy Wahyu Raharjo delves into the intricacies of testing JavaScript changes in Model-Driven Apps without deploying. The author provides his insights on enhancing the testing process by harnessing the features of contemporary browsers.

Raharjo explains that developers often resort to the "change-deploy-validate" approach whenever they tackle a new task or bug. This involves manipulating the JS component, deploying and publishing the changes, followed by testing on the desired page and reloading it. He argues that existing browser features can simplify this process by allowing developers to validate their changes directly.

Using an example, Raharjo discusses embedding an additional feature on the preSearch function to skip the filter if the "Name" contains a "test" word. Furthermore, the author emphasizes making the necessary adjustments without having to refresh the page, since refreshing restores the JS to its server version. Upon testing to check if the changes are satisfactory, these changes can be deployed.

In a subsequent update on May 1, 2023, the author makes a reference to a tutorial by Benedikt Bergmann on using Fiddler to serve a local version of Web resources. Here, he handled a rule applying a filter only in conditions where the JS with URL path contained "/webresources/tmy_demo.js" to the local file.

After applying the filter and setting up the rule, he suggests an important step which he initially missed - restarting Fiddler. The page can be reloaded to see and verify that the specified file has been replaced with your local version.

Raharjo concludes by wishing his readers cheerfully for their journey in the CRM domain, as they delve deeper into Microsoft's Model-Driven Apps.

Contextual Understanding of Microsoft's Model-Driven Apps

In the broader technical domain, Microsoft's Model-Driven Apps signify a breakthrough in app development, largely aiding developers in managing and handling complex applications.

They offer a systematic approach to create apps by ensuring data first. By focusing on the core data model, business rules, and processes, they hint at a new paradigm in data-centric application design.

The approach allows developers to concentrate on the most essential aspects of the application, thereby improving overall efficiency. Furthermore, the versatile platform extends options to leverage existing technologies like JavaScript, as demonstrated by Raharjo’s example in his blog post, to enhance application functionalities.

Predicated on the Common Data Service, these apps aim at creating an interoperable environment where dynamic data and business logics can be shared across applications, thereby enhancing their overall utility and effectiveness.

Given its evident benefits and ever-increasing prominence, it is crucial for developers to stay updated with the latest developments in this arena which the digital hub offers.

Read the full article Model Driven Apps: Testing JS changes without deploying

Model-Driven App - Testing JS Changes in Model Driven Apps Without Deployment

Learn about Model Driven Apps: Testing JS changes without deploying

Our discussion today revolves around an essential element in the world of Microsoft Dynamics 365 - the automation of testing changes in JavaScript (JS) without deploying. This is a key feature in Streamlined Apps (our alternative keyword to Model-Driven Apps). Understanding this concept can significantly reduce your debugging time, allowing for swift and efficient deployment.

As a developer, it's typical to follow a routine - modify the code, deploy, and validate. When it comes to frontend scripting, the absence of a helping tool to update files makes the process more tedious. Normally, you'd need to open the JS component, update, deploy and publish, then navigate to the page you want to test, refresh the page, and test the amendments. Although this process is not necessarily wrong, a much easier method exists to validate changes using a browser's current feature.

Your journey into this exciting world starts with recognizing your original code. An example of one could be a form present within your Streamlined App. In this form, you'd have functions filter contacts, change names, or even load certain parameters. This is where functions like `filterContact` function, `onNameChange` function, or `OnLoad` function comes into play.

To test our JS changes without deploying, you can start by augmenting additional features to pre-existing functions. For instance, to test the preSearch function, an extra feature to exclude the filter if the Name contains the word "test" can be introduced. It's possible to validate these changes and deploy once everything is in order.

However, testing the onLoad event is not as straightforward as it would also require a page refresh. Develop additional code and deploy these initial changes to ensure variables like 'context' aren't left empty after the onLoad function. Make adjustments such as adding new logic to the onLoad function, for example, if the "Name" = "onload," disable two attributes.

The process becomes faster when changes are tested and if you are satisfied with your local modifications, you can swiftly deploy them! Various tutorials and Microsoft's documentations, such as the 'Script web resource development using Fiddler AutoResponder,' can offer more insights into this novel feature. Adopting the Fiddler to serve a local version of Webresources is one step towards mastering this concept. Remember, a rule needs to be added, a filter put in place, and most importantly, the Fiddler restarted for the new modifications to surface. The power of the Dynamics 365 Technical consult, the KL Power Platform User Community Leader and the Human Code enthusiast lies in your hands.

As a final tip using the Streamlined App, be prepared to change the frame one by one (Frame which begins with idxx) and execute the onLoad function. Personally, I find this method very convenient to run a quick test on any changes implemented. And once you're satisfied with the local changes, no more delay - Deploy it!

Produces individual blog posts.

More links on about Model Driven Apps: Testing JS changes without deploying

MDA: Testing JS changes without deploying
Apr 30, 2023 — Our routine as Developers, if we get a new task/bug, is "change the code", "deploy", and "validate". For the front scripting, ...
Fiddler for Model Driven Apps
Jan 20, 2021 — We can test JS/ HTML code without deployment. Do code change in Visual Studio, refresh your browser and verify changes. One can debug or develop ...
Quick testing of Javascript web resources
Oct 1, 2021 — Another practical application of this approach is that we can test changes locally without “bugging” other team members/users. Category ...

Keywords

Model Driven Apps, Testing JS Changes, Deploying JS changes, Model Driven App Development, JS Testing without Deployment, Model Driven JS Testing, Checking JavaScript Changes in Apps, Undeployed JS testing, Model Driven Apps in JS, Avoiding Deployment while Testing JS.