Forum Discussion
Hello richie,
Like you, I needed to make a few assumptions about the question... Since it is ibright very first post, I though making some assumptions was perfectly ok. 🙂
The 'Get Data' feature is a menu item available from the groovy script editor (Setup Script, TearDown Script, Groovy Test Step) by right clicking anywhere in the text editor area. I assumed that is where ibright acquired and defined the variable. Since the property expansion references a 'Project' level variable, it should be available whenever and wherever the line of code is executed.
def aPIresultsfolder = context.expand( '${#Project#API results folder}' )
ibright appears to want to use that variable very soon in their logic but might just need the syntax knowledge on how to use the value in the part of the script they already set up.
So, richie, I think the short answer is yes. aPIresultsfolder is available for that project property expansion when requested. Good question for followup.
Regards,
Todd
Hey ibright
regarding your concern about publishing the full path within a groovy script on an unsecured web site. I'm assuming it was from a security concern more than anything else?
For future considerations - that's not the sort of thing any person of an evil hacking type persuasion can use without more info than you have provided. I once spoke to a Security Technical Architect about the stuff I could post on forums and what he said I've summarised below.
ALWAYS hide the domain that you're hitting in your tests within any screenshot you provide - but without that - no one would be able to do anything to access your resource and if they don't know the host, then they can't find the endpoint you are discussing in your posts to do anything.
Hence why providing an API's URI (the URL MINUS the HOST portion of the full request) (and even a payload) you are working with in a screenshot is fine, but no help to anyone as long as you make sure the domain (the host part of the URL) you're hitting is obfuscated. Other than that - you haven't really got anything to worry about from a security perspective.
The only thing I would say is, if you are providing screenshots - make sure that you do look over the whole image to ensure the host/domain details aren't displayed somewhere else on the screen. With ReadyAPI depending on what is selected, it's quite possible the host/domain details are displayed in multiple locations rather than just one place.
Hey TNeuschwanger - cheers Todd - appreciate the explanation - I keep dipping in and out of coding/automation which makes my coding skills totally sucky - I mean it's like anything - if you don't use it, you lose it and I definitely lost it! So yeah - cool man - cheers for the extra help! 😉
Cheers to both!
Rich