Friday 15 July 2011

variables - Tsung Issue with Dyn_Variable -


I am very new to Ireling and Tsung, I've never worked in this area, but I have found the basics I am very excited to know and deliver load tests for my web application. I am half way to completion, but I have a major obstacle and are not able to move forward, please click the tsung.xml < / Code> Read the file and tell me where and what else; What am I missing?

  ** === & gt; Tsung.xml (This file is working completely without any errors) ** * <& lt ;? XML version = "1.0"? & Gt; & Lt ;! DOCTYPE tsing system "/usr/share/tsung/tsung-1.0.dtd"> & Lt; Tsung loglevel = "debug" dumptraffic = "true" version = "1.0" & gt; & Lt; Customers & gt; & Lt; Client host = "localhost" weight = "1" maxisource = "40000" cpu = "1" & gt; & Lt; Ip value = '127.000.000.111' / & gt; & Lt; / Customer & gt; & Lt; / Customers & gt; & Lt; Server & gt; & Lt; Server host = "127.000.000.112" port = "80" type = "TCP" & gt; & Lt; / Server & gt; & Lt; / Server & gt; & Lt; Load time = "1" unit = "minute" & gt; & Lt; Arrival step = "1" period = "1" unit = "minute" & gt; & Lt; User arrival = "10" unit = "second" & gt; & Lt; / User & gt; & Lt; / Arrivalphase & gt; & Lt; / Load> & Lt; Session & gt; & Lt; Session name = "my session" probability = "100" type = "ts_http" & gt; & Lt; Transaction name = "trucks" & gt; & Lt; Request & gt; & Lt; Dyn_variable name = "myId" re = "& lift; myId> (\. *) \ & Amp; lt; / myId & gt;" /> & Lt; - Trying with RegExp option, my id & lt ;! - dyn_variable name = "myId" xpath = "// response / myId" / - & gt; & Lt; - Trying with xpath option, my id & lt ;! - dyn_variable name = "myId" jsonpath = "response.myId" / - & gt; & Lt; - Trying with jsonpath option, value myId & lt; Http url = 'http: //127.000.000.112/Create_Rec' method = 'post' version = '1.1' content_type = 'text / xml' / & gt; & Lt; / Request & gt; & Lt; Request subst = "true" & gt; & Lt; Http url = 'http: //999.000.000.999/Get_Rec/myId=%%_myId%%' method = 'GET' version = '1.1' content_type = 'application / xml' / & gt; & Lt; / Request & gt; & Lt; / Transactions & gt; & Lt; / Session & gt; & Lt; / Session & gt; & Lt; / Tsung & gt; *   

When I run this URL (a web service call) in a web browser, I get the following similar response from the server (records the database in the previous ground and new ID ii generates iid) when i run above tsung.xml, the request is requested to work properly for the first time.

=== & gt; Feedback (Browser Feedback)

  & lt; Feedback ID = "Some Web Services" & gt; & Lt; Status & gt; & Lt; StatusCode & gt; 1 & lt; / StatusCode & gt; & Lt; StatusMsg & gt; SomeMessage & lt; / StatusMsg & gt; & Lt; Status Time & gt; 2013-06-20 02:52 52: 25 & lt; / Status Time & gt; & Lt; / Status & gt; & Lt; MyID & gt; 298346728934734987 & lt; / MyID & gt; & Lt; / Reaction & gt;   

What I am seeing here, I must first catch my ID from the request and the second request will be passed in myId = %% _ myId %%, but it is never working And forever my id is empty string. I have two clues beyond dyn_variable, there is no clue and proper examples / documentation on this. Please suggest me, what am I missing?

In your request for substitution of subst = "true" to work, therefore your request Should change ..

  & lt; Request subst = "true" & gt;   

If it still does not work, then I suggest you to see the tsung.dump file and check the response that you are receiving from the server

No comments:

Post a Comment