DeejUK
DeejUK

Reputation: 13501

Can SoapUI Project Files be Split?

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.

Upvotes: 10

Views: 3106

Answers (3)

John Cummings
John Cummings

Reputation: 2184

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

Upvotes: 5

Yauheni Sivukha
Yauheni Sivukha

Reputation: 2596

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)
    } 

Upvotes: 2

ITemius
ITemius

Reputation: 881

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.

Upvotes: 12

Related Questions