Soatest Server api'S

I want to be able to use the ../V6/testExecutions api (POST) to execute the test at the scenario level. I am able to do at tst level. I have a test.tst with two scenarios, each with a rest API. Scenario1 and scenario2. Is it possible and what do I put in the "payload' to run just Scenario1? Here is my payload to run at tst level. (using 2024.2): Note: i want to do this without using CTP. thx
{
"scopeOptions" : {
"workspace" : {
"resources" : [
"/TestAssets/RestPOC.tst"
]
}
},
"general" : {
"config" : "soatest.builtin://Run Automated Server Tests"
},
"soatestOptions" : {
}
}
Comments
-
The "testExecutions" REST API largely mirrors the soatestcli. You can specify individual folders or tst files under "resources" similar to "soatestcli -resource" but you can't necessarily restrict execution to an individual scenario under a .tst file.
0 -
The -testName CLI parameter may be able to help you here, since it allows you to specify the name of a test or test suite within your .tst file that you want to run (with some options for how to match). See https://docs.parasoft.com/display/SOA20242/CLI+Options#CLIOptions--testName. The equivalent field in the testExecutions endpoint is the "testNames" field.
0 -
Other alternatives can include breaking up your tst file into multiple tst files or using test flow logic to conditionally run one suite or another based on the value of a test variable. The request to testExecutions can let you inject environment variables and you can initialize test variables from environment variables.
0