Forum Discussion
It is totally possible to code a separate tool that would split a single soapui project file to a multiple files structure for GIT. Also this tool would compose multiple files to a single SoapUI project file.
This tool can be done in plain Java for example. SoapUI project XML is easy to split since interfaces and testsuites are in their own separate elements that can be gathered and outputted to separate files as is without any further processing. You would just handle the XML structure.
You could go further down and even separate TestCases and TestSteps in separate files, but I would suggest starting from TestSuites. TestSuites already offer a good separation and if for some reason multiple people are working with same testsuite XML, conflicts are much easier to resolve compared to resolving conflicts within possibly large SoapUI project XML
General structure of decomposed project stucture would be:
- ProjectFolder
- interfaces
- orderfile.txt
- interface1_<guid>.xml
- interface2_<guid>.xml
- testsuites
- orderfile.txt
- testsuite1_<guid>.xml
- testsuite2_<guid>.xml
- project_<guid>.xml
The <guid> in the name is the "id" attribute available in SoapUI XML elements:
- con:soapui-project
- con:interface
- con:testSuite
orderfile.txt is a file that keeps track the order of the testsuites and interfaces in the project XML. In project XML the physical order of these elements tells in which order they are shown in the UI. There is no any separate order attribute that would do such a thing. That is why it could be good idea to use order file. In the order file you could for example include those <guid> identifiers in specific order. This would then allow tool to combine and put those elements in correct order when composing a single project file XML from multiple files.
So basically this tool would go through SoapUI project XML and then split from the project XML each of following elements
- con:interface
- con:testSuite
And put them to a separate file in folder structure accordingly.
Related Content
- 10 months ago
Recent Discussions
- 15 years ago