Groovy and Java scripts in one project
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Groovy and Java scripts in one project
I have a project need where i need to perform some REST calls in a groovy project but then in the same project need to call some REST API's which has some java script in it for pre setup ....can they both be in the same project as per soap ui documentation we can have only one language in the project properties with the script language set to groovy or Javascript ?
So this would be like a nested project where i need both groovy and Javascript to work in the same project
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can anyone help on this ?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can have a go at it, but im not a real scripter and i might miss something/be unaware of something that would cause it to fail.
I'll give it a shot, perhaps Rao or Himanshu may be able to help?...theyre definitely better placed to help than i.
In the meantime why dont you have a go too...youve been working with some groovy recently...right?
Between us we might be able to get somewhere.
Thats all i got im afraid,
Nice one
Rich
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There was no way I could find to have a nested groovy and JS project in soap ui hence we need to convert this to groovy
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rich
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Had a q when i try to do this in SOAP UI
The URL in the collection has
https://{{DocumentDBHost}}/dbs/rxc-provider-dev-cdb/colls/provider_pharmacy/docs
I created a project level property for DocumentDBHost with value rxc-provider-dev-us-c-cdb.documents.azure.com:443
When i use this in my TC like below
https://{#Project#DocumentDBHost}/dbs/rxc-provider-dev-cdb/colls/provider_pharmacy/docs
I get a error
- Tue Jun 23 21:54:25 CDT 2020:ERROR:An error occurred [Illegal character in authority at index 8: https://{/#Project%23DocumentDBHost%7D], see error log for details
and Null pointer exception ...
how do i make this work ?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you typing out these URLs or are you copy and pasting?
Reason i ask is you state the following:
"https://{{DocumentDBHost}}/dbs/rxc-provider-dev-cdb/colls/provider_pharmacy/docs
I created a project level property for DocumentDBHost with value rxc-provider-dev-us-c-cdb.documents.azure.com:443"
So are you saying the full URL (host and URI) is as follows?
https://rxc-provider-dev-us-c-cdb.documents.azure.com:443/ dbs/rxc-provider-dev-cdb/colls/provider_pharmacy/docs
That hostname is huge.
Anyway (sorry im getting sidetracked) i believe the error response is giving you the clue where it states " error occurred [Illegal character in authority at index 8: https://{/#Project%23DocumentDBHost%7D] "
You have an erroneous forward slash character ( '/' ) in the hostname. The 3rd slash from the left shouldnt be there. A slash is a reserved character in http as it means something specific. Hence you cant use a / in a hostname.
Also you have an extra ] character (which isnt an http reserved character) but the ] character isnt included in the URI you defined earlier in your post.
Nice one
Rich
Is that right?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue is I have 5.4 soapui so i cannot import the collection else would not have to do this ...manually create each property
If u have and are trying with 5.5 or Pro etc you could just import collection in soap ui
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suppose if you send me your collection i could import it and then save it as a new project and send you the project, but i wouldn't have thought the company you work for would allow that...
Rich
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ameesh1984@gmail.com is my gmail
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
