Add the following in a Groovy Script step; for example, called “Random”:
context.randomValue = String.valueOf((int)(Math.random()*9999999))
Use in request like so:
${Random#result}
Add the following in a Groovy Script step; for example, called “Random”:
context.randomValue = String.valueOf((int)(Math.random()*9999999))
Use in request like so:
${Random#result}
I was encountering “permspace” “Out.Of.Memory” errors, and I believe it’s because of a memory leak with the UI/Java. In any case, this worked for me:
1. Create a text file with the test suite names — will automate this soon by “capturing” the names from the XML project file.
2. Loop through it via the terminal:
while read i; do testrunner -s"$i" -R"TestSuite Report" -FPDF ~/project.xml; done < ../testsuites.txt
In case you encounter the following error using SVN — on my Mac, for me:
svn: E205007: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the –message (-m) or –file (-F) options
svn: E205007: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no ‘editor-cmd’ run-time configuration option was found
Just run the following in your terminal and all will be good:
export SVN_EDITOR=vim
Note: You can use "nano" or whatever editor you’d like.
I had a large number of ebooks that looked like the following:
Walter%20Isaacson%20-%20Einstein_His%20Life%20And%20Universe.mobi
And because I’m lazy, I looked for an automated way to clean all of them up. This is how:
1. Back up all your files in another directory
2. Launch terminal
3. Go to the directory you’d like to perform the changes
4. Type: for i in *.mobi; do mv "$i" "`echo $i | sed ‘s/%20/ /g’`"; done
5. That’s it!
Simply copy the jSon or XML into your clipboard and then run one of the following:
pbpaste | python -m json.tool > formatted.json
For XML:
pbpaste | xmllint --format - > formatted.xml