June 4th, 2018 by inflectra
Now we all know that automated testing can be a real pain sometimes. Imagine you have this big, complex web application with lots of dynamic elements, IFRAMEs, hidden layers, and other impediments to automation. Writing test automation scripts by hand with Selenium would be a Herculean task. So instead, see how we have built intelligence into Rapise to make testing such an application easy as pie.
So, as we have been developing Rapise, the ultimate UI test automation tool, we decided to focus not just on generic support for any web application but also build libraries to enhance the test automation experience for specific applications. For example, the Microsoft Dynamics 365 family of products includes several very different solutions:
Each listed test automation target is rather unique and brings certain challenges to test automation.
Let's look at what the difficulties are. Many of them are related to the automatic recording of reliable XPath locators for DOM elements
Life is easy when elements have static IDs which have the same values every time you visit a page. But this is not the case with Dynamics 365.
Dynamics 365 Business Central uses dynamic IDs, guid style:
<div id="CDF2B" class="ms-nav-group no-caption">
...
</div>
Dynamics 365 for Operations uses semi dynamic IDs, the number in the middle may change:
<button class="appBarTab-header allowFlyoutClickPropagation" type="button" id="CustFreeInvoice_3_AccountingActionsTab_button" aria-expanded="false">
...
</button>
Dynamics 365 for Sales uses semi dynamic IDs ending with generated numbers:
<div id="appGridQueryFilterContainer_Component8738712" style="height: 76px">
...
</div>
Dynamic IDs are not reliable at all and semi dynamics IDs require special processing to ignore the changing part.
Rapise groups recorded objects into Windows. The window for a web application is determined by the title of a browser at the time of object capturing. Here is a title example from (B):
New - Sales Order - S-ORD101018 ∙ School of Fine Art - Dynamics 365 Business Central
If it always records the title without any changes then after several recording sessions we'll end up with a mess - lots of similar windows with a couple of objects inside:
New - Sales Order - S-ORD101016 ∙ Trey Research - Dynamics 365 Business Central
New - Sales Order - S-ORD101017 ∙ School of Fine Art - Dynamics 365 Business Central
New - Sales Order - S-ORD101018 ∙ School of Fine Art - Dynamics 365 Business Central
This is why Rapise replaces the dynamic window titles with static equivalents:
New - Sales Order - Dynamics 365 Business Central
Dynamics 365 Business Central is built with layers. A page may contain DOM elements for several views. All are hidden except the one with highest z-order.
<div class="spa-container">
<div class="spa-overlay" tabindex="-1" style="display: block; z-index: 5;">
...
</div>
<div class="spa-view" style="z-index: 1;" >
...
</div>
<div class="spa-view" style="z-index: 2;" >
...
<a class='icon-Home'> ... </a>
</div>
<div class="spa-view" style="z-index: 3;" >
...
<a class='icon-Home'> ... </a>
</div>
It leads to the fact that the same element may be found several times if the XPath does not take into account the layered structure:
//a[@class='icon-Home']
or the element will not be found if the XPath is too straightforward (just enumerates nodes with attribute values):
//div[@class='spa-view' and @style='z-index: 1;'] ... /a[@class='icon-Home']
The problem originates from the fact that when you first login to the application it contains just one layer, after navigating through forms the number of layers grows.
Rapise handles layers for (B) automatically and generates XPath that always works with top most layer.
Each web technology has it's own style of using attributes. It is an interesting task to determine which attributes can improve the resiliency of an XPath expression. Here are some statistics we gathered for Dynamics 365 applications. The higher an attribute bar the greater it's impact on element identification within a given application. Attributes with zero influence on element recognition ability are omitted in the graphs. The ID attribute is excluded as well.
Rapise uses a specific set of attributes for each of the Dynamics 365 solutions to improve resiliency.
Any business application strongly depends on grids: tables with orders, customer lists, product lists, etc. And every grid in a particular web app has a unique internal structure. Rapise does an excellent job on handling grids in Dynamics 365. It recognizes cell clicks and captures the recording of high level user actions instead of the lower level DOM elements. Here is a fragment of recorded and parameterized Dynamics 365 Business Central test:
The short answer is Yes, of Course! If your application is approaching Dynamics 365 in terms of level of complexity, you can go down the road we paved with techniques and methods developed for Dynamics 365. If you have a simpler application or are able to influence its development to make it more automation friendly you'll get the experience we observed when testing our own test management product SpiraTest.
In SpiraTest all the important elements have IDs, there are no hidden layers, no dynamic IDs. So Rapise is able to record reliable tests on SpiraTest without any effort, and without any special libraries.
If you are looking to test a Dynamics 365 solution please contact us at sales@inflectra.com and we'll schedule a demo for you. If you plan to perform end-to-end testing of your own complex modern or legacy application - certainly contact us, we love challenges and have all the tools to beat the competition.
rapise dynamics 365 test automation microsoft dynamics complex
Ask an Inflectra expert:
SpiraTest combines test management, requirements traceability & bug-tracking
SpiraTeam brings your teams together, managing the entire application lifecycle
SpiraPlan lets you manage your programs and portfolio of projects like never before
Orchestrates your automated regression testing, functional, load and performance
The ultimate test automation platform for web, mobile, and desktop applications
The help desk system, designed specifically for software support teams
Cloud hosted, secure source code management - Git and Subversion
Let us deal with the IT pain so you don't have to
For those that need to, install any of our tools locally
Our customers work in every industry imaginable. From financial services to healthcare and biotech to government and defense and more, we work with our customers to address their specific needs.
Our products do not enforce a methodology on you, instead they let you work your way. Whether you work in agile development, Scrum and XP, Kanban and Lean, Waterfall or hybrid Inflectra can help.
If you want to learn more about application delivery, testing, and more take a look at our whitepapers, videos, background papers, blog, and presentations.
Customers use our tools to help automate repetitive tasks and streamline their business processes using our Robotic Process Automation (RPA) solutions.
We collaborate with a wide range of teams to bring our customers a range of services (including load testing, training, and consultation), complimentary technologies, and specialized tools for specific industries.
Learn how different organizations have benefited from using Inflectra products to manage their software testing and application develooment.
Outstanding support is the foundation of our company. We make support a priority over all other work. Take a look at our support policy.
Discover great tips, discussions, and technical solutions from fellow customers and Inflectra's technical experts.
If you can't find the answer you're looking for, please get in touch with us: over email, phone, or online.
We are constantly creating new videos to help customers learn about our products, including through in depth webinars, all freely available along with a wide selection of presentations.
We provide a number of resources to help customers learn how to get the most out of our products, with free online resources, virtual classrooms, and face to face.
Read about Inflectra, our manifesto, and values. Meet our incredible customers who are building awesome things. We are focused on their success using our tools.
The Inflectra Blog contains articles on all aspects of the software lifecycle.
In addition we have whitepapers,
background articles, videos and
presentations to help get you started.
Events are a big part of our awesome customer service. They are a chance to learn more about us, our products, and how to level up your skills with our tools.
We actively partner with companies and individuals all over the world. We are also a great place to work and encourage you to explore joining our team.
Please contact us with your questions, feedback, comments, or suggestions. We'll get back to you as soon as possible.
When you need additional assistance (be it training, consulting, or integration services) our global certified solution provider partner network is ready to help.
At Inflectra, we are fully committed to provide our customers with the very best products and customer service.
We want to help developers extend and customize our tools to fit in with their needs. We provide robust APIs, sample code, and open source projects.