cancel
Showing results for 
Search instead for 
Did you mean: 

Losing changes made to a script

SOLVED
Highlighted
Contributor

Losing changes made to a script

I have followed this thread 

https://community.smartbear.com/t5/SoapUI-Pro/Soapui-Pro-losing-my-test-step-changes/m-p/171647#M390...

 

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.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Leader

Re: Losing changes made to a script

@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, and remember to give "kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal

View solution in original post

13 REPLIES 13
Highlighted
Community Leader

Re: Losing changes made to a script

@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, and remember to give "kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal

View solution in original post

Highlighted
Contributor

Re: Losing changes made to a script

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

Highlighted
Community Leader

Re: Losing changes made to a script

@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, and remember to give "kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
Highlighted
Contributor

Re: Losing changes made to a script

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

https://community.smartbear.com/t5/SoapUI-Pro/Error-while-loading-a-test-case-in-readyapi-3-2-5/m-p/...

 

Not too sure if that helps.

 

Thanks

Highlighted
Community Leader

Re: Losing changes made to a script

@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, and remember to give "kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
Highlighted
Contributor

Re: Losing changes made to a script

Yes this is one of the main step, and it is losing the changes, rest of the test steps are working fine.

 

Thanks

Highlighted
Community Leader

Re: Losing changes made to a script

@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, and remember to give "kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
Highlighted
Community Manager

Re: Losing changes made to a script

@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

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
Community Leader

Re: Losing changes made to a script

@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, and remember to give "kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Compete with community members in the TechCorner Challenge and get into the Leaderboard!

Rank Participant Points Earned
1 msiadak 12
2 nmrao 8
3 HimanshuTayal 3
Top Kudoed Authors