Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This post will explain, how you can schedule test cases written in vREST. vREST do does not provide direct support for scheduling test cases on its own server. But you can easily schedule test cases written in vREST with the help of any external schedular scheduler like cron .

Here is a video tutorial for the same:

  1. For Linux

    HTML
    <iframe width="560" height="315" src="https://www.youtube.com/embed/NwhYOpPsLL8?list=PLmua155_WrDyoe7dYDB3lCfh-UK4XicT6?ecver=1" frameborder="0" allowfullscreen></iframe>
  2. For Windows

    HTML
    <iframe width="560" height="315" src="https://www.youtube.com/embed/sTrvp_JJ1dM?list=PLmua155_WrDyoe7dYDB3lCfh-UK4XicT6?ecver=1" frameborder="0" allowfullscreen></iframe>

Prerequisite

Prerequisite for the machine, on which you want to schedule test cases.

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.

...

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:

  1. In VREST_TEST_CASE_LIST_URL, every % symbol must be escaped with backslash (\).
  2. In your environment, path to vrunner can be found with the following commands (in Linux / Mac):
    1. which vrunner

in Linux/Mac and Windows Task Scheduler on Windows.


Please follow the following guides according to the Operating system of the machine on which you want to schedule the test cases:

Children Display