16 years ago
Load Test issue with SetUp Script in Test Case
Hi,
I have web service which is having following web methods..
1.RegisterPerson
2.UnRegisterPerosn
In 'RegisterPerson', it is require to provide 'unique Alphanumeric Value' for each registration as reference number.
So in 'RegisterPerson' functional test case I use 'Setup Script' to dynamically generate that 'unique Alphanumeric Value' . (using random values)
Then that generated value will assigned to Test Case Property called 'referenceNumber'.
This value is access through '${#TestCase#Referencenummer}' .
And this Test Case is working without an issue.
In 'UnRegisterPerosn' web method it is require to provide the unique 'reference number' used to register the person.
So in 'UnRegisterPerosn' function test case, I use following strategy...
1. in setup script first I will run the 'RegisterPerson' web method and retrieve the reference number from that.
2. Then I will assign that value to Test Case property called 'referenceNumber' in 'UnRegisterPerosn' Test Case.
Source Code for step 1, 2 as below..
3. To 'UnRegisterPerosn' I'm using the reference value thorough '${#TestCase#Referencenummer}'.
And this functional test case is also working without an issue.
But, When I' running Load Test (Strategy : Simple ; Threads: 4) for 'UnRegisterPerosn' it will return errors. (According to the Error Message the 'UnRegisterPerosn' can not find the given reference number in the database.)
Please help me on this if you have any suggestions...
I have web service which is having following web methods..
1.RegisterPerson
2.UnRegisterPerosn
In 'RegisterPerson', it is require to provide 'unique Alphanumeric Value' for each registration as reference number.
So in 'RegisterPerson' functional test case I use 'Setup Script' to dynamically generate that 'unique Alphanumeric Value' . (using random values)
Then that generated value will assigned to Test Case Property called 'referenceNumber'.
This value is access through '${#TestCase#Referencenummer}' .
And this Test Case is working without an issue.
In 'UnRegisterPerosn' web method it is require to provide the unique 'reference number' used to register the person.
So in 'UnRegisterPerosn' function test case, I use following strategy...
1. in setup script first I will run the 'RegisterPerson' web method and retrieve the reference number from that.
2. Then I will assign that value to Test Case property called 'referenceNumber' in 'UnRegisterPerosn' Test Case.
Source Code for step 1, 2 as below..
testCase_RegisterPerson = testRunner.testCase.getTestSuite().getTestCaseByName("RegisterPerson")
runner_RegisterPerson = testCase_RegisterPerson.run(null, false)
refernceNumber = runner_RegisterPerson.getTestCase().getPropertyValue("Referencenummer")
targetStep = testRunner.testCase.setPropertyValue( "Referencenummer", refernceNumber)
3. To 'UnRegisterPerosn' I'm using the reference value thorough '${#TestCase#Referencenummer}'.
And this functional test case is also working without an issue.
But, When I' running Load Test (Strategy : Simple ; Threads: 4) for 'UnRegisterPerosn' it will return errors. (According to the Error Message the 'UnRegisterPerosn' can not find the given reference number in the database.)
Please help me on this if you have any suggestions...