Save the file as knowledge.py in a directory of your choice.
Creating a runnable
Log in and create “Runnables” on the top menu
Click “Create Runnable” on the top right
Enter a title, choose the language and select knowledge file (knowledge.R or knowledge.py), requirement file (packrat.lock or requirement.txt) and miscellaneous files (please refer Appendices 1 and 2 for more information on the requirement and miscellaneous files). Then click “Create”
Click the title of the new runnable to move to the runnable’s detail page. Wait until the status of the first version changes from building to ready.
Making the first run request
Click the title of the new runnable created
Click "View Runs" button
Click "Run" button
Enter input in JSON that your microservices expect. In our case we need to provide an object with two keys a and b. Then click “Run” button
This will redirect you to a list of recent runs where you can find the output
Testing a microservice
Creating a test using a file
Create a semi-colon(;)-delimited file that contains input json, expected output json and maximum response time in milliseconds. An example is provided below
Enter title, choose the test file we just created and click “Create Test”
Click title of the new test. This will direct you to the test’s detail page
Make sure all test cases are listed in “Scenarios”
Adding a scenario manually
In a scenario’s detail page, click “Add Scenario”
Click "Add Scenario" button
Enter input json, expected json and maximum response time. Click “Add Scenario.” If there is an already existing scenario with the same input and expected json, only the one with the less maximum response time will remain.
Running a test on a runnable
In test detail page, click "Test Runnable"
Choose a test that you want to run for this runnable. Then click “Test Runnable”
This will direct you to a list of test results on the runnable. Wait until your test request is complete
Click the name of the test result to check the test result. You can see what scenarios passed and failed and why they failed