Getting Started With Qanairy: How to Review and Verify Tests [Part 2]




Welcome to Part 2 of the Getting Started with Qanairy series. In Getting Started with Qanairy: How to Autogenerate Tests [Part 1] we covered “Discovery”, Qanairy’s test finding and building process. In this section we're going to take a look at how to identify and run the tests autogenerated by your discovery. Tests are the core of Qanairy’s automation system; we strive to make them easy to use with simple visual data and run results. Manual testing these tests is time consuming and doesn’t scale well with today’s agile development cycle.




Manual testing can often be challenging as humans, because we can only retain so much visual information at one time. It’s the visual changes that we look for when testing, but often the differences are so subtle that it’s hard to know if anything changed at all. On top of that, visual verification only accomplishes one part of the problem; manual testing functionality is a whole different beast. Qanairy mitigates that with AI that tests your functionality and provides an output of the interaction.

Parts of a Test Path/ Identifying Tests


Figure 1: Test Profile


Test profiles are the key cards to a test’s data (See Figure 1). Each test profile contains a status, title, date, and edit controls. Selecting a test profile and expanding its details will provide you with an array of information at your fingertips. The first section you’ll see is the test path; an interactive diagram that shows the flow of the test interaction (See Figure 2).


Figure 2: Test Path


Test paths are made up of a combination of pages, elements, and actions. Tests start from a particular page and then perform an action on an element present on that page. Each test closes with a final page state; the result of the interaction. A test path can continue with more elements/pages if chained element interactions produce a different page state.

A great example of this is a form field. In order to interact with an input field a user must first click on the field and then input text. In Qanairy this would be reflected as one test with two pairs of element-actions.

Elements and actions are paired together as an action will always be performed on an element. Elements appear in the test path under the heading “Html tag” with an identifier such as button or link. Actions are linked to elements and display the action name and icon in the test path.


Figure 3: Test Profile Expanded


These element-action pairings, and the pages in the path, can both be clicked on to bring up more information about the test (See Figure 3). Both pages and elements contain cues like screenshots, xpath, attributes, and more to help you identify the interaction. Pages contain screenshots from the browsers they’ve been run in. Each screenshot can be expanded to reveal the element highlighting feature which helps easily identify the element across the different page states with a highlighted border.

Qanairy even helps with classification by smart naming your tests based on their components. Below is a list of some of the tests Qanairy will identify in your system.

Common Test Types

Page Loaded - a single page test verifying that the page was loaded successfully

Click/Hover - tests indicating an interaction or style change

Authentication - login tests built using Qanairy’s Test Users feature

Form - Qanairy identifies and builds out entire forms for input field testing

Running A Test/ Tests Page

Once you have enough knowledge to diagnose whether or not a test shows your expected result, you can assign it a status of passing or failing. These tests are then removed from the “Discovery” queue and become available on the “Tests” screen. Here, the real core of Qanairy comes into play.

From the “Tests” screen you can run any of your approved tests. Assigning a test a status gives Qanairy a baseline to test all of your future test runs against it. By establishing a baseline Qanairy will compare all future runs of this test against this set expected result to see how they differ. Select “Run” and Qanairy analyzes the current status and alerts you of any changes.

If a test comes back as passing, then nothing has changed in your environment and everything is working as expected. However, if a test comes back as failing, that can mean one of two things. If a test is truly failing and the outcome is not intentional, then you have properly QA’d your product and it is now time for the development team to address the issue. Once you believe you’ve fixed the issue, it’s as simple as running the test again to make sure that it now works.

Test Auto Repair

If a test comes back as failing, but the outcome is intentional, you will need to update the status of the test. There are times when updating code means changing the existing functionality of the tests you’ve already verified. Let’s look at that navigation example again, but this time instead of going to about.html, you’ve updated your navigation so that the “About” navigation links to team.html instead. Qanairy will identify this change and mark it with a failing status.

Despite the difference to its original state, you know that test is now correct. Updating a test status is as effortless as clicking the edit button located on the right hand side of the test, and changing the status from failing to passing. Qanairy’s test auto repair will save you time by fixing your broken UI tests.

Groups

In an effort to save you more time you can use Qanairy’s “Groups” feature to apply group tags to your tests. Groups are a great way to emulate test suites. Because Qanairy creates tests by testing your environment sequentially, there is no need to run tests in a sequential order. If there is a need to perform certain steps before another, Qanairy will build out all the necessary steps to get to the page change in a single test.

Qanairy can build out long form end-to-end tests, but you may want to still use groups to organize your test runs. Adding a group tag to a test means it is now searchable by that label. Type the name of your group in the search bar and select “Run All” to run all tests currently displayed in the search results.

History

What use is the past if we don’t learn from our mistakes? Qanairy keeps a record of your test history for the past runs. You always have a way to check back on past versions of your user interface. Your test history can be seen from the “History” tab located within each test.

Until Next Time...

Qanairy aims to make quality assurance easy by providing simple, intuitive ways to identify a test. We hope that we’ve made testing fun for you. Let us know how we’re doing or how we can improve by emailing us at feedback@qanairy.com.

Join us next time as we take at look at Login Authentication Testing!



Comments

Popular posts from this blog

Getting Started With Qanairy: How to Autogenerate Tests [Part 1]

How To Get Started with QA