Contributions
- 7 years agoPlace ReadyAPI QuestionsReadyAPI Questions1KViews0likes0Comments
Re: How could I transform a initial value to another value with code java in SOAPUI?
Sorry for the bad description of what I want to do I have the following code grovy import XXXXXX.totp.TOTPTokenGenerator; def token = ${#TestCase#token};===> How I put he input value from Propiedades, the before step? TOTPTokenGenerator generator = TOTPTokenGenerator.instancia(); generator.getCode(token);==> How I put the output to the next steep? Thanks7 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.3KViews0likes2CommentsHow could I transform a initial value to another value with code java in SOAPUI?
Hi I have the answer of a REST service. The following REST service uses as input an output of the first REST service parameter. But the value needs to be calculated with ajava progran. How could I do that? java code to convert an initial value to another import xxxx.TOTPTokenGenerator; public class Prueba { public static void main(String args[]) throws Exception { TOTPTokenGenerator generator = TOTPTokenGenerator.instancia(); System.out.println(generator.getCode(args[0])); } } Thanks you7 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.3KViews0likes4Comments- 1.7KViews0likes0Comments
Pass a parameter to a REST service
I have the following groovy script //-------------------------- Usuario ------------------------------------------------------ // create dialog def dialog = com.eviware.soapui.support.UISupport.createConfigurationDialog( "Campo Usuario" ); dialog.addTextField( "usuario", "usuario" ); // init values and show def map = new java.util.HashMap(); map.put( "usuario", "" ); if( dialog.show( map )) { // get target step def step = testRunner.testCase.getTestStepByName( "Properties" ); // assign step.setPropertyValue( "usuario", map.get( "usuario" )); } else testRunner.cancel( "Campo usuario no encontrado" ); but when I executed it .The script shows me the next message "java.lang.NullPointerException:Cannot invoke method setPropertyValue() on null object error at line:13" I would like to pass the "usuario" parameter to the followings services REST .How can implement it? Thanks for all you help!!Solved1.7KViews0likes2CommentsRe: Input parameters to call Rest Services
I´m very grateful. It is the first time I use SOAPUI and I am learning with your advice. When I put the assertion script on the first call of the REST service (Login), it gives me the following error. For input string:"" On the second call to the REST service Configuration. How could do it?2.3KViews0likes1Comment