You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by ZK <st...@gmail.com> on 2011/10/10 14:18:10 UTC

Re: jmeter parameterization

this is simililar to this post:
http://jmeter.512774.n5.nabble.com/Regular-expression-extractor-td4867973.html

ZK

--
View this message in context: http://jmeter.512774.n5.nabble.com/jmeter-parameterization-tp4887918p4888010.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: jmeter parameterization

Posted by ZK <st...@gmail.com>.
I think maybe the issue is HOW you are posting the data

Sorry I cannot be more help without actually 'seeing' the application!

Did you try to POST using the SOAP/XML-RPC sampler?

Does it work if you have the parameters 'hardcoded'?


ZK

--
View this message in context: http://jmeter.512774.n5.nabble.com/jmeter-parameterization-tp4887918p4891516.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: jmeter parameterization

Posted by ZK <st...@gmail.com>.
Ah! I see,
there are numerous ways to do this:
1. 
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#CSV_Data_Set_Config
CSV Data Set Config 
2. Variables From CSV File (
http://code.google.com/p/jmeter-plugins/wiki/VariablesFromCSV jmeter plugins
)
2. 
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#User_Parameters
User Parameters 
3. 
http://jakarta.apache.org/jmeter/usermanual/functions.html#__StringFromFile
__StringFromFile  Function


ZK

--
View this message in context: http://jmeter.512774.n5.nabble.com/jmeter-parameterization-tp4887918p4891473.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: jmeter parameterization

Posted by ZK <st...@gmail.com>.
Ok, I have had a look at what your doing and it seems over complicated....
Basically you need to be doing something along these lines:
1.Send request
2.RegEx the response to get the parameters you require
3. 'Build' next request from previous values received from regEx
Like this:
Test Plan
+Thread Group
++1st Request
+++regEX
++2nd Request (parameters 'built' from previous regEx'd values)
+++regEx

Are you sure you know how the regEx'd values are captured and reused?


So... from the description of your issue I would use this regEx to Capture
the values you need:

Reference Name = MyRef

Regular Expression = 
FirstName="(.*?)"[^>]*LastName="(.*?)"[^>]*MedicalRecordNumber="(.*?)"[^>]*ArriveDate="(.*?)"

Template = $1$

Default Value = NOT_FOUND


Once you have these values captured you can 'reuse' them as follows in your
NEXT request:
<Wrapper><Patient ObjectStamp="" PatientFullNameForDisplay=""
PatientMRNForDisplay="" Id="4294967297" FirstName="${myRef_g1}" BirthDate=""
LastName="${myRef_g2}" EthnicityId="" ContactName="" Prefix=""
FinancialClassId="" ContactRelationship="" Suffix="" PreferredLanguageId=""
ContactNumber="" MiddleName="" RaceId="" SocialSecurityNumber=""
MedicalRecordNumber="{myRef_g3}" SmokingStatusId="" AdvanceDirectiveId=""
DeathDate="" PatientSource="MANUALREG" CauseOfDeath=""><ContactAddress
ObjectStamp="" Id="" Street1="" Street2="" City="" State=""
Zip=""/><AliasCheck ObjectStamp="" PKEList="true"
AttName="MedicalRecordNumber" Auth="" Code="MRN" Unique="false"
CheckAuthList=""/></Patient><Account ObjectStamp="" PatientId="4294967297"
Id="4294967297" Source="MANUALREG" VisitTypeIndicator="I" PatientNumber=""
FinancialNumber="" VisitSource="MANUALREG" FacilityId="1554"
MedicalServiceId="" Referral="" NurseUnitId="" Room="" Bed=""
AdtVisitType="2182" StatusIndicator="ACTIVE" ArriveDate="{myRef_g4}"
ReasonForVisit="" DischargeDate="" DischargeDiagnosis=""
DischargeDisposition="" FinancialClassId="" SecondaryFinancialClassId=""
AdmittingPrsnlLOOKUP="" AdmittingPrsnl="" AttendingPrsnlLOOKUP=""
AttendingPrsnl="" ConsultingPrsnlLOOKUP="" ConsultingPrsnl="" PCPLOOKUP=""
PrimaryCarePrsnl="" ReferringPrsnlLOOKUP="" ReferringPrsnl=""
CareManagerLOOKUP="" CareManager="" HospitalistLOOKUP="" Hospitalist=""
NightHospitalistLOOKUP="" NightHospitalist="" ContactName=""
ContactNumber="" ContactRelationship="" PrimaryLanguage=""><AliasCheck
ObjectStamp="" AlternateClassName="WebEntity" PKEList="true"
AttName="FinancialNumber" Auth="" Code="ACCNUM" Unique="false"
CheckAuthList=""/></Account></Wrapper>

Also using this technique you can also 'build' your URLs from previously
regEx extracted parameters...
i.e (just an example):
/framework/wc_servlet.jsp?PatientId=${regExVariable1}&PatientName=${regExVariable2}...etc


you should read this:
http://jakarta.apache.org/jmeter/usermanual/regular_expressions.html

Also I think maybe the SOAP/XML-RPC sampler maybe better for you here to
send the 'Wrapper'?

Hope this helps

ZK

--
View this message in context: http://jmeter.512774.n5.nabble.com/jmeter-parameterization-tp4887918p4891052.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: jmeter parameterization

Posted by ZK <st...@gmail.com>.
Can you provide an example of the request that results in the error?


ZK

--
View this message in context: http://jmeter.512774.n5.nabble.com/jmeter-parameterization-tp4887918p4889088.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: jmeter parameterization

Posted by ZK <st...@gmail.com>.
so this isssue
(http://jmeter.512774.n5.nabble.com/Regular-expression-extractor-td4867973.html)
is now resolved?

ZK

--
View this message in context: http://jmeter.512774.n5.nabble.com/jmeter-parameterization-tp4887918p4888264.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org