Contributions
Re: Dynamic global properties
Follow up to my previous post: I created a Java app that updates C:\Temp\currTmstp.txt. I have a batch file that runs that using "java -jar ...". I am able to run the batch app and I see the correct values in the text file.9 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes0CommentsRe: Dynamic global properties
So close!!! I am using this syntax: ${="type \\Temp\\currTmsmp.txt".execute().text} The file is in C:\Temp. I've also tried ${="type /Temp/currTmsmp.txt".execute().text} . . . and . . . ${="type C:\Temp\currTmsmp.txt".execute().text} I keep getting an error from the service: { "error":{ "code":"401", "message":"Invalid base64 passed to dp:decode 'Cannot run program \"type\": CreateProcess error=2, The system cannot find the file specified'" } } It almost looks like the service call is actually working and the receiving system is generating that error message but that would be freaky. Anyway, I'll keep trying but so far, no luck.9 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes1CommentRe: Dynamic global properties
Right. The value might not change every time but it isn't known when it will change--so updating it with the current value every time is what I am looking for. Is that Java code you are using? So, generically,I can do this: ${java code}? If so, I think we're on the right track. It takesseveral lines of code to generate thevalues I need though--and there are references to external JAR files. Can I create a JAR file with a main method that returns what I need in System.out and then putmy JAR (and other externalJARs) somewhere that SoapUI can findthem . . . then do something like this: ${mainClassInJarFile} Or is there some other way I can execute some external process to get the values?9 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes3CommentsDynamic global properties
I have a service that is secured using a signature and timestamp in the header values. The values timeout after a minute. I've created global properties and I reference them in the tests. I've created a batch job that updates the SoapUI properties file (soapui-settings.xml) with new values (basically copies the entire properties file line by line and updates these values when those lines comes up during the copy). This is working great--except I need to restart SoapUI for it to use the updated values. Very annoying to have to shut down SoapUI, run my batch app and restart SoapUI every minute! Any idea how I can automatically re-read the global properties values while SoapUI is running? P.S. I am open to other solutions. I don't like copying the properties file--scares me that I'll corrupt it someday. Is there a better way? I'm thinking some syntax to tell SoapUI to read the global property value from a file at run-timeor something? . . . maybe like this: ${file://someDir/currentSignature.txt} Thanks in advance!9 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes5Comments