Forum Discussion

Raghukatta's avatar
Raghukatta
Contributor
7 years ago

skip execution of folder depending on the condition

Hi,   Currently, we run automation scripts in the US. I am updating them to run in German. I don't want to wait until everything is updated to run in German local. Is there any way we can run/skip ...
  • tristaanogre's avatar
    tristaanogre
    7 years ago

    This is why, as convenient as it is for constructing a suite of test cases quickly, I don't like using "Test Items" as the primary driver for what gets executed.  You can't dynamically change things in code.  Using an SQL data table, Excel spreadsheet, or CSV file to indicate the list of tests to execute is actually very flexible because then all you need to do is alter the file and click "run"... then your tests run.  You could even have multiple copies of the file and, depending upon the configuration to run, you just drop in the necessary file or even have your code retrieve the file.

    In very high level pseudo code, it could be something like this:

     

    If configuration = US, then file_name = "US Test cases"

    if configuration = Germany, then file_name = "Germany test cases"

    ExecuteTests(file_name)