The test-suite file contains the definition of the tests and has an extension .nbits. The tests are defined in an xml format, meaning that you can edit this file with any xml or text editor.
Start by creating a new xml file with your favorite xml editor. If you want to validate the syntax of your file during its creation, you can reference, in your editor, the XSD available in file NBi-TestSuite.xsd available in the folder framework of the NBi zip file.
Your xml file should start with standard metadata information
Then, you must create an xml element testSuite and fill the attribute name. This name will be the name of your test-suite. The attribute xmlns is there to reference the xml namespace in the xsd (validation of the structure of your xml): don’t modify it.
In your the testSuite element, you need to specify your first test and its name. This is done through the xml element test and its attribute name. This name will be used by the underlying framework (NUnit) and so will be displayed in reports and UI.
For each test, you need to specify the system-under-test and the assertion that will be executed on this system. These two parts of the test are defined by the following xml elements:
In the example, here under, we’ll test that the results of two queries are equal. The first query is the system-under-test and is defined in the xml element system-under-test. More info about this kind of system-under-test can be found there.
First, we need to specify which kind of test we’ll perform. Here we’ll perform a test of execution (meaning that we’ll execute a query or an etl). For this, we’re using the xml element named execution inside the xml element
After the definition of the system-under-test, you need to define what will be asserted on this system. Here, we will assert that the result-set of this query is equivalent to the result-set of another query.
The full listing for this test is available here under:
Naturally, you can specify additional tests in your test-suite by creating more than one test elements.