how to fetch all the TC name and test step names that have db query?
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how to fetch all the TC name and test step names that have db query?
In a soapu ui project suite, I want to fetch the TC name and test step names containing the db scipts.
I am using the code below, getting an issue at the line i.e underlined , tried few things but nothing worked.
If someone can help.
testRunner.testCase.testSuite.project.getTestSuiteList().each {
if(it.name.equalsIgnoreCase("bank")){
it.getTestCaseList().each {
for (testSteps in it.testStepList){
if(testSteps instanceof WsdlGroovyScriptTestStep ){
log.info testSteps.name
log.info testSteps.getContent() or testSteps.contains("db query")
}
}
}
}
}
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have a requirement to update the db query that are used in the groovy scripts. Hence want list the test steps of specifc groovy scripts that contains db query.
tried using contains function but unable to read the text written in groovy.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
once identified the tc and test step names , it will be easy for me to update.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes i do have specific string to search for.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please find if the below script resolves the issue and follow in-line comments.
https://github.com/nmrao/soapUIGroovyScripts/blob/master/groovy/MatchingScriptFinder.groovy
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Rao for your quick response and help . it worked 🙂
