Forum Discussion
nmrao
Champion Level 3
Here is the tiny script which does what I posted earlier.
NOTE: tested on os version and project is single xml file (not composite)
/**
This groovy script take soapui project as Input
And removes all the suites except the given list in "suites" variable
And writes the sub set of the project (as all the suites are removed) into given path.
Context: If the project size is very big, it takes time to load the project into the tool.
This script will help just to only create small project out of the big one, so that load the project with given suite in quick time.
Ref: https://community.smartbear.com/t5/API-Functional-Security-Testing/Best-way-to-load-test-suite-as-per-test-requirement/m-p/220444#M49415
How to execute this script?
You may create an empty project and create an arbitary test case and add groovy script test step and paste the below script in there
and modify values for below
-- templateProjectPath (absolute path of the original soapui project)
-- subProjectPath (provide the absolute path where sub set of the project needs to be written
-- suties (provide the suite names which needs to be copied into sub project)
**/
// Modify values for below
def templateProjectPath = '/home/apps/projects/testProject-soapui-project.xml'
def subProjectPath = '/tmp/test-soapui-project.xml'
def suites = ['mySuite', 'contextTestSuite']
// No modification require beyond this
def templateProject = new com.eviware.soapui.impl.wsdl.WsdlProject(templateProjectPath)
templateProject.testSuiteList?.findAll { !(it.name in suites) }.each {templateProject.removeTestSuite(it) }
templateProject.saveAs(subProjectPath)
nmrao
4 years agoChampion Level 3
Similarly we can write back the suite from sub project in case if any updates to the original project in the same fashion.
- aaronpliu4 years agoFrequent Contributor
Thanks nmrao , actually I would like to work on composite project since many team members cooperate and just one script library to share.
Each test suite save as a directory which including element.order and .xml, and each test suite belongs to an owner. When owner update test suites and the change take place in current test suite only, do not impact any other test suite and will not change order / element under project root (git checkout and ignore specified folder in project)
Thanks,
/Aaron
- nmrao4 years agoChampion Level 3I couldn't try on composite. But the API should still be same ?
Related Content
- 2 months ago
- 9 months ago
- 6 years ago
- 2 years ago
Recent Discussions
- 5 days ago
- 10 days ago