Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How run a test conditionally ?

mmb_mcse
mmb_mcse Posts: 1

Hi dears,
I have a excel data source with multi columns and multi Rows, and in the SOA test i have some test (.tst) which each one included some test cases. I want to run .tst tests conditionally. it means for example check "Column A, Row 1" if value is "Yes" run whole A .tst test case, if value is "No" don't run it, for " Column A ,Row 2" likewise, and so on.

before "Datasource "on the "Testsuite "in "variables" i define a variable and bound it to a "column A" but it doesn't catch my purpose and value of the variable was default value which is defined in the variable( zero).

I would really appreciate if anyone faced with it and help me to cope with this issue.

Answers

  • [Deleted User]
    [Deleted User] Posts: 0
    edited July 2018

    Hello,

    I was able to create an excel datasource and bind a testsuite variable to a column in that datasource without any issues. Do you mind uploading an example tst so I can take a look at how you're setting up the variable and datasource.

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited July 2018

    The file scope calculation, where the tool determines which files to test or execute, can be configured based on a list of paths or patterns to match which files should or shouldn't be included. However, test suites (within tst files) can use a data source to control which child tests are executed. See "Variable Condition" from Configuring Test Suite Properties. In particular, you can define a variable of type "Data Source".