10

Is it possible to split a SoapUI project XML file into many smaller files?

I can see the XML file being a contention point in code versioning, and result in many merge conflicts. It'd make more sense to have the project split into many smaller files so that changes are more isolated; but then we may end up with shared config being replicated between them.

Is the a commonly-adopted solution to this problem? I've never used SoapUI (someone on my team uses it) so I'm likely ignorant of SoapUI best practice.

DeejUK
  • 12,891
  • 19
  • 89
  • 169

3 Answers3

12

May be "composite project" option fits your requirements: http://www.soapui.org/Working-with-Projects/team-testing-support.html

This option is only available in soapUI Pro.

Abhishek Asthana
  • 1,857
  • 1
  • 31
  • 51
ITemius
  • 871
  • 9
  • 19
5

To address this portion of the question:

I can see the XML file being a contention point in code versioning, and result in many merge conflicts.

It may help to have SoapUI format the project file in a more VCS friendly way by pretty printing the project file. Try Preferences -> WSDL Settings -> Pretty Print Project Files

See also Formatting a SoapUI Project File

Community
  • 1
  • 1
John Cummings
  • 1,949
  • 3
  • 22
  • 38
2

Here is small powershell script which parses requests from SoapUI project to separate files. It might be somehow useful.

$lookupPath = "C:\temp\soapui-project.xml"
$ouputFolder = "C:\temp\out"

$invalidChars = [io.path]::GetInvalidFileNamechars()

[xml] $contents = Get-Content $lookupPath

$ns = @{con="http://eviware.com/soapui/config"}
$items = Select-Xml -Xml $contents -XPath '//con:request[@mediaType="application/json"]'  -Namespace $ns
$nodes = $items | Foreach {$_.Node}

$requests = $nodes | 
    % {             
        $fileName = ($_.name -replace "[$invalidChars]","-") + ".txt"

        $_.request | out-file (join-path $ouputFolder $fileName)
    } 
Yauheni Sivukha
  • 2,586
  • 20
  • 22