Tag: #TestActivityDiagram

Why Vitaq AI and why now?

Vitaq is equipped with AI machine learning algorithms that are coverage led. When you run Vitaq in AI mode, it will use the coverage model (defined by you the user) as the goal to try to achieve 100% coverage. It will do this by working out what is the most optimal set of tests to achieve this target.

The variable nature of your Vitaq Test Activity will provide many next allowable action selections and many different test data inputs. By informing the Vitaq AI machine learning algorithm what you care about, i.e. what user journeys you want to test and what test data you want to be generated, Vitaq will continuously run until it achieves 100% coverage of your coverage model.

The reasons to adopt Vitaq AI Test Automation:-

1) It helps you extend your testing from your traditional test Mocha (or other) Frameworks by creating a Vitaq AI Test Activity diagram by re-using all of your test framework JS code.

2) Your new Vitaq Test Activity allows the user to apply AI Machine Learning algorithms to auto-generate tests that focus on the things that you the QA Tester really cares about, which is your user journeys.

3) Vitaq AI gives users the ability to continuously generate tests which are highly variable, data-driven and which will explore the test space in ways which QA Testers may not necessarily think about.

Advantages of using Vitaq AI Test Automation:-

Vitaq AI delivers the following benefits:-

1) Productivity.

2) Efficiency and Effectiveness.

3) Reducing Risks.

Let’s discuss these three characteristics in more details :-

1) How Vitaq AI helps to improving productivity :-

It helps to improve productivity because you are able to capture your complete test space with a graphical visual model which is our Vitaq AI Test Activity.

This graphical test model, helps to drive the business logic of testing out into the open for all of the project contributors to see. It helps to improve communication between your managers, developers, dev testers and QA testers.

By releasing the power of AI machine learning to “explore” your newly created Test Activity Diagram (model of your test space) Vitaq AI will use compute power to auto-generate different test scenarios of test action script after test action script. All of these test action scripts can be be enhanced with highly variable auto-generated test data to give you data-driven tests. Because Vitaq AI by its very nature will give you highly variable tests, it does things which test developers might not think about, which helps it find defects which other approaches miss.

2) How Vitaq AI helps to improving efficiency and effectiveness:-

Vitaq AI Test Automation Tool helps in utilizing the test scripts that you may have already written for Mocha or other test frameworks, then enables you to make them data-driven and reusable across the test space.

With Vitaq AI the user is able to complete their testing by leading with QA Coverage. The user journey coverage capability is a unique way of not only monitoring, measuring and analyzing your user journey test coverage
but becomes the very goals that the AI machine learning algorithms of Vitaq will use to auto-generate your tests.

3) How Vitaq AI Helps in Reducing Risks :-

Vitaq AI uses the power of variability which auto-generate tests that quite often are not created in conventional frameworks like Mocha. So it will auto-generate tests that QA testers may well have missed, This helps find defects the other approaches miss and knowing that you have covered all of the user-journeys you care about, helps in reducing risks.

As well as completing all of your test requirements by achieving 100% QA Coverage, Vitaq AI can be run continuously to ‘explore’ in your test space to find corner cases that may escape into production. You can leave Vitaq AI running continuously utilising your spare compute resource 24 hours a day, 7 days a week. This will reduce your risks by helping to find more bugs earlier and make sure they get fixed before delivering your software build to clients or stake holders.

Vitaq AI can help take your Test Automation to the next level, so if you want to release the power of AI machine-learning combined with your QA testing skills, then the Vitaq AI-driven, coverage-led, auto-generated tests will make your testing life easier.

Dividing and conquering your test space with the easy to capture Vitaq AI Data-Driven Test Activity Diagram

Vitaq AI provides users with an easy way to divide and conquer your applications functional test space by drawing test activity diagrams. This simple process involves the user taking the complete list of Test Requirements for our e-commerce AutomationPractice.com, which were previosly documented into Jira then dividing them in the most modular way to start performing Vitaq AI Test Automation to achieve the required 100% QA coverage results.

Let’s find out how we can take modular sections of requirements out of our Jira list to map to our VitaqAI Test Automation Tool:-

1) Below you will see our list of high level test requirements documented into Jira.

2) Now Open the Vitaq AI Test Automation Tool and add the common test actions needed to achieve the user journeys described in Jira for testing the sign-in of already registered users and new registration of a user through to checking their account details including wishlists, credit slips and the like to signing out. In addition to this add the new letter registration and contact us test action to increase the test space coverage. We have simply divided this section of our test space into a single test activity diagram by connecting each common test action to the next action it is ‘allowed’ to go to in the e-commerce AutomationPractice.com application. Resulting in single test activity diagram comprised of common test actions needed to meet the Jira test requirements for this registration and user account test space shown below:-

3) Now to capture the user-journey requirements defined in Jira: Click on the Sequences tab besides Test Action Scripts tab

What is Sequences tab in Vitaq-AI Test Automation Tool ?

Sequences:- Sequences in VitaqAI are referred to as user- journeys where we define the traversal path of the test run.

4) To Create Your User Journey Coverage Under Sequences Tab. Click on + Button

5) Enter the Sequence Name let’s say VTB_10 and keep the Add Sequence window open till you select your user journey by selecting respective test actions as required for your test run.

In the Above Screenshot, you can see numbering is taking place on each test action in the sequence while selecting each and every test action. This provides the user with an easy to visualise specification of our user journey goals for testing.

6) Click on Ok Button of Add Sequence Dialog Box. and we will see that VTB_10 has been added under the Sequences Tab.

These user-journey coverage goals are used by Vitaq AI’s machine learning algorithms to focus the automated-test scenarios generated to create the optimal set of tests to achieve 100% QA coverage.

To capture all of the test space defined in our Jira requirements we only needed to complete four separate Vitaq Test Activity Diagrams. The diagrams grouped the common test actions needed to execute user-journeys for particular types of test scenarios, such as user registration or product purchase and check-out. The four different test activities are shown below:-

Test Activity Diagram one

Test Activity Diagram Two

Test Activity Diagram Three

Test Activity Diagram Four

Why have four Test Activity Diagrams been created, why not one ?

By creating four Test Activity Diagrams we have divided and conquered the test space into four easy to visualise and hence debug user journey coverage groups. This is a more productive way of working with Vitaq AI Test Automation rather than creating one big Test Activity Diagram which would be harder to debug. Having four diagrams instead of one also increases the opportunity of deploying more dynamic variability in the automated tests Vitaq AI will create to meet the user-journey coverage goals, so there are more chances of finding bugs.

How to map your JavaScript Test framework code from Mocha, Jasmine, Jest or Espresso into Vitaq

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. 

Inshort we can say that Vitaq AI Provides an AI-Driven, Coverage-led, continuous autonomous testing to than can be used with JavaScript, Python or Visual Code.

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 :- 

1. Double Click on your desired Test Action for which you want to copy a Mocha JavaScript test. This might be a single function to complete a specific automated test or series of functions to test a whole web page. To Explain this concept we are going to use the user created “sign_In” Test Action of our Vitaq Test Activity diagram example below.

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.

Test Activity Log and Script Output in VitaqAI Test Automation Tool

The Vitaq AI Test Automation Tool helps you to debug your Test Activity Diagrams when your test runs show failures in User Journeys or Use Case Sequences. The two main debug windows are Test Activity Log and Script Output tab.

Before we jump into Test Activity Log and Script Output Tab let’s quickly highlight what debugging is and why it is important to you as QA tester.

In general, we think about debugging only when a problem comes up while writing and executing our test code and we do not know how that problem has occurred. For diagnosing defects and problems in software code you will always need a good debugger which is why you should get to know your IDE well.

Let’s discuss some of the facts to frame the discussion :-

1) The later the bug is found in the software development process, the costlier and harder it is to fix it. If the code written by the developer is buggy and we can find out about it in the earlier stage of development then its easier to fix it before it becomes a critical component of our customers interface to their customers. But if it gets caught at a later stage of time then many newly developed modules are related to it and that can cause major restructuring. Worse yet, if the bug is discovered after the product has shipped, it may require recalling the entire product. In short, the sooner the bug is found easier it is to fix it.

2) Studies have shown that there is 1 bug in every 10 lines of code and that can only be discovered when that application is tested by hitting the edge conditions.

3) Other research on testing shows that 55% to 70% of the time spent on a typical software project is spent on testing and debugging. This large amount of time spent on testing and debugging makes it very hard to schedule projects accurately and is a significant cost burden for any software based product.

4) Software development methodologies around the world have attempted to address these issues by reducing the number of bugs that get built into the product in the first place.

We all know that every code could have probability of having bug in it, the sooner we can eliminate these bugs, the fewer problems will need to be fixed in the testing and debugging phase and the sooner our project can be released

How Test Activity Log and Script Output in Vitaq AI Test Automation Tool help in Debugging

But what if we create bugs in our test code in Vitaq? Let’s say while running our Test Activity Diagram we face several issues that might occur due to error in software under test code or our test code or any specific environment issues then how can we debug?

Here comes Test Activity Log and Script Output in Picture. Let’s see a few common issues and try to debug them via Test Activity Log and Script Output messages.

1) When there is a mis-match between naming convention of defined Test Action and Function/Method present inside the Test Action.

2) When user somehow closes window intentionally/during code execution on Vitaq AI.

3) When user fetch/request data from Test Activity Variable.

4) When there is a syntax error in any of the test action.

Likewise Test Activity Log and Script Output helps a lot in debugging the errors productively while writing and executing our Vitaq AI Test automation code.

The best methodology to follow is to use the Test Activity Log to give us the high level detail and then the script output tab can be used to do a deep dive into the error details so that we can get to understand the cause of errors.