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 workspace setup documentation.
Add a new test
When you want to create a new test, go to an existing dataset from the list of datasets within a selected depot or create a new dataset.
-
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.
-
Fill in the Test Name.
-
Select checkboxes next to the parts of test you want to have included in the template of the Test logic (this part is to help you construct the data processing and testing). In no checkbox is selected, the Test logic contains only the initial import.
- Assertion – include function assert() to test of your data with higher priority in case of failure
- Warning – include function warn() to test of your data with lower priority in case of failure
- Info – include informative output
-
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.
-
You can adjust the Code of the test for an increased identification or you can leave there the default value.
-
You can add some description for the test or you can leave the field empty.
-
After initial configuration 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, description and maximum score can be adjusted
- Name – name to identify the purpose of the test
- Code - for unique identification and potential grouping
- Description - brief explanation of the objective and outcomes of the test
- Score value – maximum value of score achievable by the test
- Possible outputs – list of all possible result statuses formed based on the TestType
- Source – data provider (e.g. GA4 Data)
- Depot & Dataset – location of the test for better orientation
Below the information about the test is a multi-functional button, allowing you to:
- 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
- Save the test and Run it subsequently
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. When you run the test, the result appears above the Query logic and Test logic. Note that 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. If you do not save them, you will be reminded upon leaving if you want to return to save the changes.
Save Template to My Templates
When you have a prepared set of tests, you can store them in My Templates for further use with different data. This is especially useful for companies with multiple webs measured into separate GA4 properties or for agencies because it allows you the build your optimal set of tests once and then use it across different data. To do so you can simple open your prepared set of tests, click on the arrow next to the Edit button and select the option Save as template. After selecting a comprehensive name, the template is created under My Templates and it is opened. You can directly use the template by selecting Use Template (for details refer to the guide).