Tag: #AI-MachineLearningAlgorithms

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.

How to Implement WebDriverIO Page Object Model in VitaqAI Test Automation Tool

Page Object Models using WebDriverIO is fully supported by the Vitaq AI Test Automation Tool. Whether you are creating your Page Object Models from scratch in Vitaq or simply copying them from an already created Mocha (or other) Test Framework is quite simple.

Before diving into implementing Page Object Models, let’s discuss about their benefits in brief :-

Page Object Model, short hand POM, is a design pattern which nowadays has become very popular with QA and dev testers skilled in the art of test automation because of its characteristics which help in reducing code duplication over and over again and also helps in test maintainability.

Advantages of using Page Object Model (POM) :-

1) Actionable Code becomes much cleaner and readable as operational code i.e., Locators, Functions, and Methods is all present in one place which is the page object files.

2) Less Optimization of Code is needed because of reusable functions/methods present in page object files.

3) Functions or methods can be written in a more sensible way through which the meaning of that function i.e. what action it is going to perform can be understood. E.g. If we want to add an item on our shopping cart we can do so by creating a function/method named as clickOnAddToCart();

Let’s find out how we can implement the Page Object Model using WebDriverIO in the Vitaq AI Test Automation Tool and compare this to what you probably already know, which how you use them in Mocha:-

We will demonstrate a scenario where we will be searching an item say T-shirt on the sample e-commerce website i.e.,http://www.automationpractice.com/, and then carry out the checkout process for the guest user.

1) To Navigate to www.AutomationPractice.com. we keep our base url in the config file while using traditional webdriverio Mocha setup.

We can simply copy this Navigation or Base URL in Const Variable Config of Mocha, over to our JavaScript Functions File in Vitaq.

2) Now what we need is locators and functions before performing our desired test operations. For that, we create pages where we keep them separately. In the example below we are performing a search for an item in the e-commerce site and adding it to the shopping cart. So intuitively we name our page as AutomationPracticeSearch_Page.js

Likewise, we can pick relative locators and functions/methods and put them in JavaScript Functions present in VitaqAI Test Automation Tool as shown below:-

3) Now we have all the locators and creation of function/methods which are using all these locators completed we need to write the code to perform our required test actions. In Mocha (and other conventional test Frameworks) we create our test files by write our test code in the way as shown below :-

To re-use this Mocha code we can simply copy this code into our Vitaq Test Action scripts. As an example, here we perform the above actionable functions/methods from Mocha by copying itinto our VitaqAI Test Automation Tool through Test Actions present in Test Activity Diagram shown below:-

So you can see that it is very simple to re-use your Mocha (or other conventaional Test Framework) code by copying it across or if working on a new project implement your page object model (POM) using WebDriverIO in VitaqAI Test Automation Tool directly? You get the benefits of quickly making your test Automation framework AI-driven, data-driven and highly variable to reach 100% QA test coverage in the shortest possible time by letting the power of your computer auto-generate continuous exploratory tests and find defects that other a

Measuring User Journey coverage and how Vitaq AI uses AI Machine Learning algorithms to achieve 100% Coverage.

The Vitaq AI Test Automation Tool provides users with the ability to monitor and measure user journey coverage by defining the sequences of test actions (and the test data used in these tests) that make-up our required journeys or use-cases. This can then be used as Test automation goals or Test objectives, which will guide the Machine Learning AI Algorithms to auto-generate tests which achieve those goals aiming to reach 100% QA test coverage.

User Journey:- The User Journeys are defined by the sequence of Test Actions in the Vitaq AI Test Automation Tool. The Test Activity diagram essentially models the path or Journeys which the user needs to go through to perform tests on the web of mobile app Software-under-test to achieve their desired test requirements.

Let’s find out more about these User Journeys, Vitaq AI Machine Learning Algorithms and how it maps to QA Coverage through some visual representations:-

1) In our last blog, we showed you how we create user journeys (or use case sequences), so as a reminder let’s take a look below at the screenshots.

Let’s say we have a test requirement called VTB_5 documented in Jira, which is our User Journey (or Use Case Sequence) and we want to see this happen at least once during our Test Automation run. So, we give our Vitaq AI sequence the name VTB_5 with a coverage target goal of 1 (i.e. needs to happen at least once). Then the user clicks on each test Action in turn on the Test Activity Diagram that makes up the user journey required. Here you can see the numbers in orange circles starting from 1 through to 7. Where action 1 in the sequence is Home, action 2 landingPage through to action 7 which is signOut. This sequence will be one of many user journey goals that the QA tester will want to cover during Test Automation.

2) After creating all of our required User Journeys (or Use Case Sequences) and completing the test scripts inside each of the test actions, we need to enable Coverage and AI through the edit preferences section of Vitaq. For that we click on Edit and select Preferences in the top banner menu of Vitaq.

3) Edit Preferences dialog box will open and enable the Use Coverage and Use AI checkbox. Ensure that Database information should be prefilled and then click on the Ok button.

4) When using JavaScript (instead of Python or Scriptworks visual code) in our Vitaq Test Activity diagrams, we will need to run the Vitaq JavaScript Client with WebDriverIO Configuration and a Selenium Server in command shell windows. So we need to open two terminals separately. Click on System Tools and click on LX Terminal. Note that you can also run Selenium (or Appium) outside the container either on your host machine or in a private or public cloud service.

5) In one of the terminals out of two opened terminals. enter “./vitaq_client.js -w webdriverio” to run Vitaq Client with WebDriverIO and hit Enter or Return key from Keyboard.

6) In Another Terminal. Enter “./selenium_server.sh” to run Selenium Server and hit Enter or Return key from Keyboard.

Now we are all set to go and hit Run button in Vitaq AI.

7) Click on the Run Button with Blue Play Symbol present on the top of the Vitaq window. By Clicking on it, Vitaq’s Machine Learning AI Algorithm will Start running continuous highly-variable auto-generated tests. Each new ‘seed’ run it makes will inform the AI algorithms to learn how to focus in on the required User Journeys gradually learning the traversal paths and executing tests until it achieves 100% test Coverage.

8) To see the percentage of test coverage covered achieved at any given time we can click on Coverage Button. It will display our percentage of test coverage which has happened during the run till it gets completed and shows 100% Test Coverage.

This is how we can make sure we have not missed any traversal path present in User Journey and achieves 100% Coverage through the unique and powerful Machine Learning AI Algorithm in Vitaq AI Test Automation Tool.

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.