This post will explain, how you can schedule test cases written in vREST on Linux / Mac.
Here is a video tutorial for the same:
Prerequisite
Prerequisite for the machine, on which you want to schedule test cases.
- Download vrunner binary
- For download and setup vrunner, please follow Setup / install vrunner.
Let's take a sample application (Contacts Application) and step by step guide on how we can schedule vREST test cases.
Note: You can find the source code of sample application at Github.
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Step 3: Add the above vrunner command in any external schedular
Now, you can add this vrunner command in any external schedular like cron. That's it.
For example, if you want to schedule vREST test cases daily at mid night, then you may write the cron job like this:
Code Block |
---|
0 0 * * * /path/to/vrunner --email="<VREST_EMAIL>" --password="<VREST_PASSWORD>" --url="<VREST_TEST_CASE_LIST_URL>" --logger="json" --filepath="<ABSOLUTE_LOG_FILE_PATH>" |
Note:
- In VREST_TEST_CASE_LIST_URL, every % symbol must be escaped with backslash (\).
- In your environment, path to vrunner can be found with the following commands (in Linux / Mac):
- which vrunner