How to use 1 groovy script value to another groovy script
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to use 1 groovy script value to another groovy script
How to use 1 groovy script value to another groovy script ?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That description of what you need is going to need a lot more detail before anyone is gonna be able to help out!
People are going to need to understand your use case, what your groovy scripts are doing etc.
If you need to pass a value from one script to another it could be fairly simple (depending on what your scripts are doing), but no one's going to be able to help until you provide a lot more info i'd expect!
Cheers,
Rich
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are several ways to use the value of one groovy script to another groovy but before answering i need to know what kind of value you need to use or transfer via one groovy to another.
Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓
Thanks and Regards,
Himanshu Tayal
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@HimanshuTayal and @richie, thank you for looking into this!
@ankushpoly13, can you please send the information that Himanshu and Rich requested?
Olga Terentieva
SmartBear Assistant Community Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does it really require two groovy script test steps in first place? Can't the logic be done in single step where you don't land into problem itself?
If you can't avoid two steps, then save the value into custom property and access it in the other script.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@nmrao brings up a good point and that's typically how I handle having to share results of a groovy script across tests. Store it as a property and use property expansion to reference it.
---
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Community, thanks for your assistance!
@ankushpoly13, please let us know if the question was answered.
Tanya Yatskovskaya
SmartBear Community and Education Manager
