Dynamic Activity Map: The Future of AI in Test Automation

Following on from the previous post, we will now introduce you to dynamic activity maps, the future of AI in Test Automation.

Take a look at the digital bank activity map shown below. Let’s consider how we would use our activity map if we had Digital Bank customers who only had access to a Checking Account and not Savings? After logging into our digital bank app, these types of users can only take the step to create a new Checking Account. So how can we handle this? Vitaq AI has the ability to dynamically enable or disable actions (steps) in the activity diagram.

The Future of Test Automation


Dynamic Activity Map

To demonstrate this dynamic activity in the map, we will extend the login test action script as shown below.

Future of AI Test Automation

As explained in the previous post, Vitaq AI can auto-generate intelligent test data. When it runs it will use the AI machine learning to select values from the Test Activity variables. You can see above that we “requestData” from the usernames Test Activity variable, which has a number of different values it can choose from. If it selects checkingAccountOnly as a user name, then the conditional “if username =” statement will become true. Which in turn calls the “runCommand” method which used to call a Vitaq method to disable (by set_enabled False) newSavingsAccount Test Action.

Similarly we can do the same for savingsAccountOnly customers too.

Future of AI Test Automation

Before we explain the complete login Action Script above. Let’s look at the final use of dynamic activity used in this example.  When logging in fails for the digital bank app, the checker will fall into the else condition. Hear we disable all following Test Actions, so no further steps can be taken in the app. That forces the Digital Twin to start its Test Automation run again until it achieves a successful login.

Page Object Patterns, Assertions and The Future of AI in Test Automation

When you look closely at the snippet of code above, you can see that we are using Page Object Patterns.  A separate reusable JavaScript class called “loginPage” was created. This contains all selector identification and any interaction with the browser as shown below.

Furture of AI test Automation

In the checker code “confirmSuccessfulLogin” from line 122, you can see that we have chosen to use Chai expert assertions in WebdriverIO  Our assertion is checking to see if the browser uRl includes the test for a successful login or not. This is neatly placed into a try catch block, so that any errors can be handled without stopping the execution of our AI Test Automation.

Leave a Reply