How to run multiple projects at a single launch? - soap

I have 4 projects, which are depended each other,I am suppose to run 4 projects one by one.
Is there any way to run as single package?

I suppose that you're running the SOAPUI project using testRunner. Looking at testRunner documentation you can see that it's only possible to pass one project to the call.
However if you're using some automation build tool like gradle you can create and approach creating a custom task to for example make various calls to testRunner passing your projects to execute all sequentially, for more details take a look on this answer.
If you're not using any automation tool or you don't know how to implement it then as a possible workaround you can simply can create a CLI script to do so. For example supposing that you've the SOAPUI_HOME/bin in your classpath on Windows you can create myTestRunner.bat with the follow content:
call testrunner "path/to/your/project1.xml"
call testrunner "path/to/your/project2.xml"
call testrunner "path/to/your/project3.xml"
...
Hope it helps,

Related

Build code in vscode using external http server

Our code building process is done via an http server which starts the build process after receiving a project uuid from the build command. Once the server starts the compilation, GCC compatible output can be fetched from it.
Note: only my extension is aware of the project uuid which is different per workspace.
AFAIU I can implement it by:
programmatically adding a task which will call a script with the correct workspace uuid. Is this possible?
Having my extension manage the build process. This seems to be far from supported.
Bottom line, I'm trying to avoid asking the user to add anything to the configuration files and I want to completely manage the build process.
Thanks!
As I didn't find a suitable only vscode solution I did the following:
Defined a helper script which I executed as the task. The helper script was respojnsible for the communication against the HTTP server.
I registered the task using vscode.workspace.registerTaskProvider API, and made sure to register it only after figuring out the UUID.
Then in the task itself I executed the helper script.
(A nice task register example can be found here: https://github.com/Microsoft/vscode-extension-samples/tree/master/task-provider-sample)

How to integrate rest api test using soapui with selenium using junit framework

I want to integrate selenium-webdriver framework written using junit with soapui rest api test suites, is there a way to do it?
Thanks in advance
Based on your comments, here is how you need to change your tests, so that, you will be able to run both kinds of tests together from within SoapUI i.e.,rest and ui.
I am not sure, if you already happened to create a soapui project. If not, create the project, import your .wadl or swagger definition of REST API.
Then create test suite, and test cases as required.
Now the test case should be having the steps as defined:
Rest Request Step(one or multiple steps) : this contains all your rest api calls
Groovy Script : Whatever test code that you have in your junit test, needs to come here. Groovy should be able to run most of your java code. But, if you are familiar, you can add groovy code itself. So, that it will be able to do exactly the same as you run it from your eclipse IDE.
Bringing your test steps into soapui test case will also have an added advantage that you can even share the data (in the form of variables ) across rest and UI as well.
You can even execute the tests using SoapUI's commandline utility testrunner.bat/.sh of SOAPUI_HOME/bin directory.
It is also possible to define application url / credentials in the form of Project / test suite / test case level properties (as applicable to the tests) and use Property Expansion. This even helps to run the tests against different servers such as dev, qa etc.,
I understand that you wanted to junit to execute the tests, but if you wanted to purely junit, then there is no need / get benefit using SoapUI. Instead of SoapUI, you can use different library, such as groovy wslite to make rest calls in junit itself .
Hope this helps.

Does the XML Report Processing work for NUnit3?

I'm currently moving one of our projects to DNX (.NET Core now) and I was forced to update to nunit3. Because of other considerations, we run compile the test project as a console app with its own entry point, basically self-hosting the NUnit runner.
I now need to report the results to TeamCity via the XML Reporter, which doesn't seem to parse Nunit3 TestResults.xml files.
Any advice on how to work around this?
The NUnit 3 console has the option to produce results formatted in the NUnit 2 style.
Use the option:
--result=[filename];format=nunit2
Docs: https://github.com/nunit/nunit/wiki/Console-Command-Line
To add to the answer above:
NUnitLite inherits the --result CLI parameter which seems to do the trick.
Another option, which I went for in the end is using the --teamcity CLI parameter:
dotnetbuild --project:<path to project directory> -- --teamcity
which will integrate with TC's service messages. This will also do real-time updates.

How to parameterize Bamboo builds?

Please note, although my specific example here involves Java/Grails, it really applies to any type of task available in Bamboo.
I have a task that is a part of a Bamboo build where I run a Java/Grails app like so:
grails run-app -Dgrails.env=<ENV>
Where "<ENV>" can be one of several values (dev, prod, staging, etc.). It would be nice to "parameterize" the plan so that, sometimes, it runs like so:
grails run-app -Dgrails.env=dev
And other times, it runs like so:
grails run-app -Dgrails.env=staging
etc. Is this possible, if so, how? And does the REST API allow me to specify parameter info so I can kick off different-parameterized builds using cURL or wget?
This seems to be a work around but I believe it can help resolve your issue. Atlassian has a free plugin call Bamboo Inject Variables Plugin. Basically, with this plugin, you can create an "Inject Bamboo Variables from file" task to read a variable from a file.
So the idea here is to have your script set the variable to a specific file then kick off the build; the build itself will read that variable from the file and use it in the grails task.
UPDATE
After a search, I found that you can use REST API to change plan variables (NOT global). This would make your task simpler: just define a plan variable (in Plan Configuration -> tab Variables) then change it every time you need to. The information on how to change is available at Bamboo Knowledge Base

sbt custom task using a class in project

How can I add a custom task to sbt build definition that consumes (uses classes, runs methods etc.) the project sources ? It seems it tries to find them before compiling even.
I need to know why you want to call the methods, since this changes the answer. If you want to do something ...
Build related
Want to use class/ methods which do something build related ( minfiy things, uploaded jar/wars to servers, etc..)
you have to put this in a plugin or you need to put the sources in a project folder.
The code cannot be called from your project
If it is build related, someone has probably dealt with a similar problem and there is probably a sbt plugin already, but if not, then let me know and I can explain creating sbt plugins.
Non-build related
Want to just call / test methods which don't have anything to do with the build cycle.
You can put this in an object in your project called Script (name it whatever), start up console and then import script object and run.
To make this even easier you can make a custom import script for the console which imports all scripts automatically, which you can then run
So for example,
package script
object Script {
def foo = println("I am doing things non-build related")
}
in sbt now run
console
>> import script._
>> foo // prints out "I am doing things non-build related"