Losing changes made to a script
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Losing changes made to a script
I have followed this thread
And I am a Local admin in my machine when I am using ReadyAPI, I am losing my changes many times, and as i am making changes to script type variables only.
So most of the time my script is failing as the changes are not saved.
Kindly let me know if there is something else that can be done to resolve it.
I m @ 3.2.5 right now.
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@anand1 :
Could you please let us know at what point exactly you are losing your changes.
As i didn't faced this in past 2 year, i think smartbear team have resolved this issue.
What you can do is:
1. deleting temp files from %temp% folder if you are on Windows and
2. In Preference Setting , tick on the option to save and exit option by default.
3. In Preference setting, Select option to auto save project after 30 mins or 60 mins interval
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
Thanks @HimanshuTayal
In my test case there is a Datagen Test step and in that step I have added multiple like 10 or so script type variables and then based on my req, i am adding the script.
It has been observed more than twice now that I saved my project, restarted the machine and then when executing the test case , lost changes in some of the variables.
I am not able to find a pattern as to what all things are getting lost, but it is reverted back to some earlier version.
And regarding the settings, the option to save and exit option by default, was default checked and i have provided the interval now which is 0 by default.
Let me take some dig if I encounter the same issue again.
Thanks
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@anand1 :
Change the Auto save interval to 30 or 60 so that your project gets saved automatically after 30 or 60 mins respectively, by this way minimum or no changes gets lost.
And do one more thing, clear all your soapUI and Error logs then save the project and check whether any error occurs while saving the project or not.
Hope you will get some solution out of it.
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
Thanks, yes i did the changes to set the interval time to 30 mins
Cleared all the error logs/cache
however whenever I save and relaunch the readyapi, i have noticed there is an error
Not too sure if that helps.
Thanks
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@anand1 :
If this is the step which is loosing changes then this could be the reason, but if both the test steps are different then you need to dig in to find the reason or you can open a support ticket so that Smartbear team can look into it and help you in any possible way.
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
Yes this is one of the main step, and it is losing the changes, rest of the test steps are working fine.
Thanks
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@anand1 :
You can implement the workaround for this by writing your custom groovy code to generate random number/string and saving the numbers/string to Properties step and using those in your request. Below is the Function which i have created to generate Random String/Numeric/AlphaNumeric, you can use that too:
def num = generateRndString(10, "numeric");
log.info num
def str = generateRndString(10, "string");
log.info str
def alphaNum = generateRndString(10, "alphanumeric");
log.info alphaNum
testRunner.testCase.getTestStepByName("Properties").setPropertyValue("RndNum", num)
testRunner.testCase.getTestStepByName("Properties").setPropertyValue("RndString", str)
testRunner.testCase.getTestStepByName("Properties").setPropertyValue("RndAlpha", alphaNum)
def generateRndString(int num, String type){
def randValue = "";
if( type.equalsIgnoreCase("numeric") ){
def alphaNumeric = ('0'..'9').join()
randValue = RandomStringUtils.random(num, alphaNumeric)
while (randValue.size()!=num)
{
randValue = RandomStringUtils.random(num, alphaNumeric)
}
}
else if( type.equalsIgnoreCase("string") ){
def alphaNumeric = (('a'..'z')+('A'..'Z')).join()
randValue = RandomStringUtils.random(num, alphaNumeric)
while (randValue.size()!=num)
{
randValue = RandomStringUtils.random(num, alphaNumeric)
}
}
else if( type.equalsIgnoreCase("alphanumeric") ){
def alphaNumeric = (('0'..'9')+('a'..'z')+('A'..'Z')).join()
randValue = RandomStringUtils.random(num, alphaNumeric)
while (randValue.size()!=num)
{
randValue = RandomStringUtils.random(num, alphaNumeric)
}
}
return randValue
}
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 Wow! Thank you for sharing the function!
@anand1 did you try implementing this workaround? How did it work?
Sonya Mihaljova
Community and Education Specialist
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@sonya_m ,
Can we add this in tech corner so that others can get help from this too 🙂
Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓
Thanks and Regards,
Himanshu Tayal
