testname match is not selecting the matching file
soatestcli -data "C:\Parasoft\Workspace" -resource "Policy\Scripts\ActionPolicy" -config "user://Example Configuration" -testName match: "sanity" -report "Report_Sanity.html"
I have used above command to run the test script whatever matching "sanity" with test name. But its run all the files in the resources path mentioned.
Can anyone suggest whats wrong with command?
Comments
-
"-testName [match:] " allows you to match the name of a test in a test suite. In other words, it is used to filter tests within the tst files in scope, not the tst files themselves. Instead, I think you probably want "-include %PATTERN%".
For detail, please check the SOAtest User's Guide under "Setup and Testing Fundamentals > Running SOAtest > Testing from the Command Line Interface (soatestcli)"
1 -
Thanks. Can you please give me some example of how to use "-include %PATTERN%" ? because the SOATest guide is not having much details on this command
And also is there any way to check the test scripts available in the sub folders and execute those script also?? If anybody know, kindly do let me know.
0 -
If there are specific tst files you want to execute then you could specify their exact paths with multiple -resource arguments. Otherwise, the -include (and -exclude) arguments are nice to do pattern based filtering of resources within the resource paths specified by any prior -resource arguments.
The docs include an explanation and examples that seem accurate to me and do provide quite a bit of detail. I wouldn't want to simply repeat what's already there in the docs. However, in your case, it looks like you want to run tst files in "Policy/Scripts/ActionPolicy" but only ones tst that have "sanity" in the name? To do this, you probably want
-include *sanity*
or-include **/*sanity*
. Or, for example, if you wanted to run tst files in any subfolders named "sanity" then you would want-include **/sanity/**
1 -
"Patterns specify file names, with the wildcards * and ? accepted, and the special wildcard ** used to specify one or more path name segments. Syntax for the patterns is similar to that of Ant filesets."
1 -
Concerning
-testName [match:] <test name>
, I can provide an example of that as well.-testName "sanity"
would run tests named "sanity" within any tst files in scope.-testName match: "sanity"
would run tests with "sanity" in the name within any tst files in scope.1 -
Thanks a lot... I will try this approach and let you know..
0