Introduction to writing tests in Waaila

To start writing tests in Waaila, you need to have a depot with a dataset connected to some data in your Waaila account. To learn how to to configure it, follow the 'Getting started with Waaila' documentation.

Add a new test

  1. Go to My Depots/[MyDepotName]/[MyDatasetName]

  2. Select button "+ ADD TEST".

    • In case you have no tests in your Dataset yet, the button "+ ADD TEST" is located below the information about the source and the dataset.
    • In case you already have at least one test in your Dataset, the button "+ ADD TEST" is located to the right just above the list of the included tests.
  3. Fill in the Test Name.

  4. Select the checkboxes next to the parts of test you want to have included in the template of the Test logic. In no checkbox is selected, the Test logic contains only initial import. The Query logic template is fixed to minimal necessary amount of input. The Query logic and Test logic are described in detail below.

    1. Assertion – include function assert() to test of your data with higher priority in case of failure
    2. Warning – include function warn() to test of your data with lower priority in case of failure
    3. Info – include informative output
  5. You can specify the Max Score parameter or leave there the default value (100 if either Assertion or Warning is included, 0 otherwise) and return to it after you adjust the Test logic.

  6. You can adjust the Code of the test for an increased identification or you can leave there the default value.

  7. You can add some description for the test or you can leave the field empty.

  8. When you finish configurating the first setting of the test, confirm by clicking "Create". You can edit the Test Name, Max Score, Test Code and Description fields later in the Test Editor window.

The Test Editor page

The Test Editor page is divided into several parts. On the top, below the navigation line, there is the summarized information about the test:

  • Name – name is set when creating the test but it can be adjusted by clicking on the edit sign next to it
  • Possible outputs – list of all possible result statuses formed based on the TestType
  • Score value – maximum value of score achievable by the test, filled in by the user
  • Source – source of the data for the test
  • Depot & Dataset – location of the test for better orientation
  • Description - brief note on the purpose of the test

Below the information about the test is a multi-functional button, allowing you to:

  1. Run a test without saving it yet (the default option) – while editing you can check how the changes impact the results without saving the new version of the test
  2. Save the test and Run it subsequently
  3. Run the test in Debug mode

The main parts of the test, the Query logic and the Test logic, are located just below the Run button. The Query logic specifies which data you want to load for your test, including the time range, rows, columns and filters. The Test logic then manipulates the data if necessary and based on the selecting functions either only outputs the resulting data, or checks it against some condition and informs about the result.

For tests on data from Google Analytics and version 3 Data Query on AT Internet, the fields for Query logic and Test logic are side by side, whereas, for tests on data from version 2 Data Query on AT Internet, the Query logic is just a line for insert a link to data located above the Test logic field. For test using version 3 Data Query on AT Internet there is an additional button for inserting a link so that queries can be inserted both as a link and as a JSON-structured query. Both Query logic (for different data sources) and Test logic are described in detail in further sections.

When you evaluate the test in the Test Editor, the result appears above the Query logic and Test logic. This result does not impact the score of the previous batch run on the list of tests with the Dataset.

When you finish editing a test, you can return to the list of the tests by navigating through the navigation line about information about the test. Don’t forget to save the changes if you want to keep them. But if you do not save them, you will be reminded upon leaving if you want to return to save the changes.