Forum Discussion

lakshmi465's avatar
lakshmi465
Occasional Contributor
14 years ago

Few Queries in SoapUI

Hi,

I am new to SoapUI. Currently I am implementing SoapUI in one of my projects for load testing. Please help me in answering a few queries in the tool.

1. Is it possible to read values sequentially from a text file in SoapUI? If so please share me the groovy code to parameterize 'trackerid' and 'userid' values in the below SOAP request.

<chal:getData>
<chal:trackerId>5</chal:trackerId>
<chal:userId>5100</chal:userId>
</chal: getData >
</soapenv:Body>
</soapenv:Envelope>

2. How can we check for the request which is sent to the server? I am just seeing response from the server in the tool.
3. How can we set a scenario like: 5 users should ramp up every 10 seconds and with a steady state duration of 30 minutes and 5 users should ramp down every 10 seconds in SoapUI?
4. How to achieve think time concept in SoapUI?
5. How to perform correlation in the tool?

Thanks
Sowbhagya

5 Replies

  • lakshmi465's avatar
    lakshmi465
    Occasional Contributor
    Hi,

    Please help in in reverting replies to the below queries as there are some important deliverables associated.

    Thanks in advance
    Lakshmi
  • Hi,

    You may be able to somehow achive this in soapUI, but I would definitely do this in loadUI (using a soapUI Runner Component in loadUI to run your soapUI TestCases).

    Just my 2 cents

    Henrik
    SmartBear Software
  • lakshmi465's avatar
    lakshmi465
    Occasional Contributor
    Hi,

    Thanks for the reply.

    Currently I am facing problem in SoapUI 4.0.0 during parameterization, for which I am trying to create a text file and passing the values from the file. In the tool, I am adding groovy code for data read from text file. The values are reading in a random fashion instead of sequential manner for a user load of some 3 threads.

    Please help me in providing suitable code to resolve the issue.

    Thanks
    Lakshmi
  • rajareddytester's avatar
    rajareddytester
    Occasional Contributor
    Hi,

    Can some body suggest me how to get the "StartTime" and "TimeTaken" of a test step in soap ui pro using groovy script

    FYI I am using the below code to print the rest of details

    def filePath = context.expand('${#Project#FilePath}');
    def requestId = context.expand('${#TestCase#RequestId}');
    def serviceName = context.getTestCase().name;
    def statusCode = context.expand('${#Response#//*:envelope[1]/*:body[1]/*:Status/*:StatusCode}');
    def statusDesc = context.expand('${#Response#//*:envelope[1]/*:body[1]/*:Status/*:StatusDesc}');
    def status = context.expand('${#TestCase#Flag}');
    def startTime = context.expand('${#TestStep#StartTime}')
    import java.text.SimpleDateFormat;
    def DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss:sss";
    def cal = Calendar.getInstance();
    def sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
    def StartTime = sdf.format(cal.getTime());
    File foutput = new File(filePath);
    if (!foutput.exists()){
    String line = "RequestId\t" + "ServiceName\t" + "StatusCode\t" + "StatusDesc\t" + "Status\t" + "StartTime\t";
    foutput.write(line+"\n");
    }
    String line = "$requestId\t" + "$serviceName\t" + "$statusCode\t" + "$statusDesc\t" + "$status\t" +"$StartTime\t";
    foutput.append(line+"\n");

    Thanks,
    RR
  • Hi,

    You can use below groovy script to print timetaken in execution of request.

    c= messageExchange.getTimeTaken().toString();