This post will explain, how you can schedule test cases written in vREST.
Step by Step Guide:
Step 1: Write your automated test suite in vREST
First you need to write test cases for your test application in vREST to ensure the build quality of your web application. Then copy the test case list URL by clicking on button "Copy Current Test Case List URL" available in Continuous Integration section. You can find the test cases for this sample application in vREST here.
Step 2: [Optional] Learn how vrunner command works and get your hands dirty on it by installing it locally first
First setup the vrunner module by following the guide Setup / install vrunner.
Once you setup this module on your local machine, you can execute the vREST test cases by executing the following command:
vrunner --email=<EMAIL_ID> --password=<PASSWORD> --url=<URL OF vREST Test Cases> --logger=xunit [--filepath=<absolute log file path>] [--env=<ENVIRONMENT>]
- email: Email ID through which you have registered on vREST
- password: Password of your vREST account
- url: Provide the test case list URL here. You can find the test case list URL by going to your vREST instance and select Test Cases tab. Now click on button "Copy Current Test Case List URL" available in Left hand side, below the "Filters section". Provide the copied URL in this option.
- logger: Use xunit here. Reporter xunit will export the test case report in xml junit style, which can be used in any continuous integration server to publish the reports.
- filepath: Absolute path of the log file, into which execution process and result logs will be dumped. If path/file is not present, tool will try to setup that path, and create file automatically. Please note that if file already exists, that will be overwritten. By default it will be the `vrest_logs/logs.xml` in current directory.
- env: [Optional] Provide the environment name which you have defined in vREST (Case-sensitive).
- Write test cases in vREST
For writing test cases in vREST, follow this post.
- [Optional] Select test cases by applying filter which you want to schedule
Now, apply some filter criteria to select the test cases which you want to schedule. Suppose you want to execute test cases of version say v1, then apply filter for v1.
- Copy the current test case list URL
Now, copy the test case list URL from the Continuous Integration Section by clicking on button "Copy Current Test Case List URL".