Vitaq AI works seamlessly with Selenium, Appium, visual coding tools like Scriptworks, all CI tools, visual checking tools like Applitools and all cloud device platforms such as Saucelabs. At present this AI-driven test Automation Tool is Delivered in Docker for Mac, Windows and Linux. This product has been developed to increase UI and API test creation productivity, provide continuous auto-generated tests using the power of AI machine learning algorithms and find software functional bugs that other approaches miss.
Mapping Mocha (or any other Test Framework) Code into Vitaq AI Test Automation Tool
Software Testers write their Automation code in their favourite IDE’s such as Eclipse, Intellij, Visual Studio Code etc. They quickly become productive in debugging their code in these IDE’s due to their feature-rich syntax checking, code completion and debugging capabilities. QA and dev testers have their favourite IDE which they gain experience with over time since they have started coding. So we have made sure that our Vitaq AI users can keep this productivity by being able to use their IDE of choice to create, check and debug their code as they create it for Vitaq AI driven test automation.
Before mapping our existing Test Framework code such as Mocha into the Vitaq-AI Test Automation Tool, We need to understand Vitaq Test Actions and Test Activity Diagrams to know what they are and how they work to help the QA and dev tester make the transition to continuous autonomous testing.
Test Actions :- Vitaq Test Actions typically represent web pages or app screens and the test scripts in these actions implement what the user can do, such as click a button or enter some data. The test data and sequences of Test Actions are auto-generated by Vitaq to efficiently fill the test space.
Test Activity Diagram :- The Test Activity Diagram in VitaqAI Test Automation Tool is a highly visual approach for describing test scenarios which ultimately makes it easier to develop and automate the generation of intelligent tests for dynamically generated content in websites and mobile apps. Many call this type of approach Model Driven testing. A Complete Test Activity Diagram consists of a number of Test Actions which are connected to their next allowable Test Actions to model what the user wants to test in a particular user journey or use-case scenario based on their test requirements.
Let’s now take a look at how Mocha Tests can be picked up and dropped into the Vitaq script section of a particular Test Action :-
2. Go to the Sign_In function you have created in your Mocha Test.
3. We have used JS page object models for our Mocha tests. In our Mocha environment we have already created a signIn function which is present in the AutomationPracticeHome_Page js file. Therefore we can reuse that JS function from Mocha directly into Vitaq AI like this “AutomationPracticeHome_Page clickOnSignInLink()” inside the Vitaq sign_In Test Action script.
It is very easy to reuse all of your standard test framework code in the Vitaq AI Test Activity diagram.
Let’s now take a look at how your re-used Mocha test code can be enhanced to become data driven for highly variable exploratory tests by using Vitaq Test Activity Variables :-
In the above example we have used the sign_In Test Action which contains a simple click function which did not require any test data. When writing test code for Mocha functions which requires test data, we would typically put in fixed values. If we want highly variable data that continuously changes according to the needs of achieving coverage requirements of our test space then how can we provide that? Luckily Vitaq has come up with an ingeniously simple way of replacing our fixed date in Mocha (or other common JS framework tests) with something they call a Vitaq Test Activity Variable.
Test Activity Variable:- Vitaq Test Activity Variables are the test script variables which hold test data and hence we can substitute them into our reused Mocha test code. In the Vitaq Test Action scripts we can call upon this test data dynamically as Vitaq AI runs. So when Vitaq AI running, is executing each Test Action Script in each Vitaq Test Action and then chooses what is the appropriate next allowable test action in the Test Activity diagram to execute next. All these next Test Action decisions and test data generation decisions are driven by the AI machine learning algorithms of Vitaq to “cover” the user journey requirements. Simply giving you continuous auto-generated AI-driven and coverage-led test scenarios.
Let’s look at the user journey example for User Registration. To test it completely we will need test data created for the user’s first name, last name, address and phone number. We could stick to a very directed and static value based test data from Mocha or we can release the Power of variability by using the Vitaq Test Activity Variables provided by Vitaq AI Test Automation Tool to automatically create the data needed driven by the AI machine learning algorithms to the tool.
In the example for User Registration, we need the user’s first name , last name , address and phone number. All of this data can be kept inside the Test Activity Variables provided by VitaqAI Test Automation Tool.
Let’s go through the details of newsletter Test Action where the re-used Mocha code is now in the Vitaq test Action script requires newsLetterName Test Activity Variables for subscribing to newsletter of AutomationPractice.com. Let’s take a more detailed look at that to Understand it.
1) Double click on the newsletter Test Action where we are using the Vitaq Test Activity Variable named as newsLetterName Present under Activity Variable Tab on the Right Most Side After Action Properties Tab.
2) Inside the newsletter Test Action Script, we can see Test Activity Variable newsLetterName has been called using requestData() which is one of the Vitaq AI library methods which we can simply use to generate and return new values for our defined Vitaq Test Activity Variables when they are called in a Test Action Script.
Each time Vitaq AI runs this Test Action and executes the JS Test Action Script, Vitaq AI will decide what are the most appropriate data values to create for the defined Test Activity Variables and hence dynamically enhances your reused Mocha test action scripts for Data Driven Testing.