aFrigge
7 years agoFrequent Visitor
Data Generation SoapUI - Swedish organisation number
Hi!
I'm very new to groovy (and SoapUI) scripting and I have no experience with Java.
I'm trying to create a script that generates swedish organisation numbers for automated tests.
When building a TIN you use the luhn algorithm (wiki), but I have a hard time figuring out how to make it in groovy.
I've found some examples of how to do it in Java (link), but I don't know how to translate it to groovy and make it work in SoapUI.
The format I want is 999999-9999 or 9999999999.
Thank you!
[EDIT]
I tried generating the first 9 digits from DataGen, but I still don't understand how I can calculate and append the property with the check digit.