jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ZK <stevesenio...@gmail.com>
Subject Re: jmeter parameterization
Date Tue, 11 Oct 2011 08:10:27 GMT
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


Mime
View raw message