script library using Groovy - SOAPUI - groovy

Hi there,
I’m starting to work with SOAPUI and Groovy.
I found the reusable code problem. I mean, I would like to avoid having a lot of copies of the same script in different projects.
As I want to make a "global library", how could I do it?
I saw the following method, http://www.spamer.me.uk/wiki/doku.php/soapui_reusable_script_library?rev=1350558275 but I have some doubts. Would it be the only way to do it?
Thank you very much for your help and sorry for the inconvenience.

You need create a JAR with your code and put it to bin/ext in your soapui directory (for example C:/Program%20Files/SmartBear/soapUI-Pro-3.0-beta-2/bin/ext/sqljdbc.jar ) so it will be added to soapui classpath

Related

Has someone already used the XsdTypeImporterTask from XsdBuildTask.dll in MSBuild?

I used to convert XSD files to CS files using the XSD.exe program.
I made a custom MSBuild Task to do that and it works quite well.
Now, I try to find an MSBuild Task to do it because I don't want to maintain my custom task anymore.
I found the XsdTypeImporterTask from the assembly XsdBuildTask.dll which seems to do that, according to the MSDN documentation.
However, that documentation is really poor and I didn't succeed to make it work, not even to import it in MSBuild :'(
I tried to Google and to StackOverflow this but didn't find anything about that.
Does someone on Earth use this Task?
Can someone help me using this Task?
Thanks a lot!
Well, after succeeding to use it, I can say that someone used it: me.
This page helped me understand how to use it.
It works very well!

Errors when running Language-Solution in MPS

I'm developing an DSL with jetbrains MPS. It's not obvious to use, but I succeeded so far with the design-part.
It's possible to right-click on a solutions node and "run" it, assuming the language is executable (extends executing.util). Plus I use a seperately developed jar as a library (used by the generator).
I build a new project to test, as simple as possible, added some extra nodes and loops in the generator, the error occures and it can't be undone.
As far as I can see, there are several possible sources of errors.
dependencies (they are tricky in MPS)
my jar
wrong cached files or so
Executing "run" causes the following error:
error: could not find or load main class MySolution.package.map_concept
Has some of you out there experience with this?
Tell me, if there are some extra information that would help.
It seems that you have added the jar file as a model to the language, which makes it invisible for the solution. Following the instructions at https://confluence.jetbrains.com/display/MPSD32/Getting+the+dependencies+right#Gettingthedependenciesright-AddingexternalJavaclassesandjarstoaprojectruntimesolutions and creating a separate library solution worked for me.
To me this looks like a problem of the generator. Have you fully rebuilt the project - right-click on the "project" node in the structure tree?
Is the root mapping template correct? If you can share your project, I can have a look.
A small tip that could have saved me some time and might also solve this problem for someone else, even if you followed the instructions in other answers.
When prompted to add your libraries to modules after including the libraries on Java tab, dismiss the window if you already included them in the first place on the Common tab. Otherwise they are listed once despite having been added twice, leading to a compilation failure.

How to rename a Testcase or Teststep using Groovy in SoapUi

I am re factoring large sets of tests in SoapUi.
Is there a way to automate creation and renaming of test cases/test steps through Groovy?
Thanks.
Possibly not what you're looking for but I've had some success manually editing the test suite xml using find and replace in a text editor. You need to be careful and make sure to back up a copy.
You can run Groovy code within SoapUI using SoapUI Groovy Console plugin. This way, you can change any property you want programmatically (within API constraints of course).
As for technical details on how to solve your actual problem, I can only refer you to this blog post and SoapUI's javadoc. Based on the blog post, you need to figure out what's given to you, and based on the API, you need to figure out how to achieve what you need.
In my case, I started with my project being bound as a project variable, and moved on from there.
There is really not so much information in the question about what you really need to achieve, but given the little you provided, one way to go would be to directly modify the soapUI project XML file. I have done this with some success in the past. The last I used soapUI, it UI did not come with massive refactoring functionality.

What is the use of TestNG in Selenium Webdriver Hybrid Framework?

Suppose I am running scripts by reading data(including runmode) from an XLS and storing the results also in a new copy of the XLS, what exactly would be the role of TestNG in the framework? Please help.. Thanks in Advance!!
Rajesh
TestNG is not just to manage the way you read your input parameters/data etc. It actually does a lot more. Try to answer these questions -
- How do you invoke some method always on a Class load ?
- How do you invoke some method before/after each method within your test ?
- How do you tell which is your test ?
- How to generate an HTML based report based on the log statements you have ?
The answer to above queries (if TestNG was not there) would have been really complex and would require quite some coding experience.
As suggested earlier, please read the info about TestNG and how it can be efficiently utilized and then again try to answer the above questions in this post.

How can I get IntelliJ IDEA to recognize the GPars DSL?

According to the GPars User Guide, IntelliJ IDEA is supposed to be able to recognize the GPars DSL right out of the box as soon as the GPars jar is added to the project. Since Groovy 1.8, GPars is now included in the Groovy distribution, but adding that facet to the IDEA project doesn't seem to help.
Does anyone know how I can activate the DSL support? It would be really nice to have the DSL keywords recognized instead of having little underlines everywhere.
Note: I'm using IntelliJ IDEA Ultimate v11.1
It seems GPars jar from Groovy distribution doesn't contain gdsl script which teaches IDEA to work with GPars dsl.
The simplest thing you could do is to add this gdsl file in your project
http://git.codehaus.org/gitweb.cgi?p=gpars.git;a=blob;f=src/main/groovy/groovyx/gpars/Definitions.gdsl;h=49f6993221645e3d887e6bf99c3c0fc46afef69e;hb=b0155a809a5c9adf9de816f18121d5a60d4b455d

Resources