Publish Swagger (OpenAPI 2.0) Documentation

Download Luna

Luna API

Write, Document, Publish

Define the Sequence of the tests

The sequence in which the tests are executed can be defined in the v1_Sequence property of the APICalls class

By default this sequence is implemented

[

"v1_Reset_GET (test1)",

"v1_Contacts_GET (test1)",

"v1_Contacts_GET (test2)",

"v1_Contacts_GET (test3)",

"v1_Contacts_POST (test1)",

"v1_Contacts_PUT (test1)",

"v1_Contacts_DELETE (test1)"

]


NOTE: The text is there to make it easier to read. What needs to be changed is the default value of the property.


The reason that we start with reset, is that we can then start from a known situation, and that the run of all the tests should therefore always return the same values.

On the first run we store the results of the tests in the testresults table of the testresults.db SQLite database (if the database did not exist, it will be created in SpecialFolder ApplicationData when running the tests (see modFunctions.CreateOrOpenDB)).

On subsequent runs we compare the result from the API with the result in the DB. If the result is the same then our test was completed succesfully otherwise we have a failure. This means we can use our LunaAPI2Swagger program for API Unit Testing as well.