Forum Discussion
- what about the values in the STEP1.RESPONSE? I mean does not required any change based on request?
- Since both requests are related to different operations, that would(what you mentioned/requested) only possible if you persist the data from different requests (I mean data from STEP1.REQUEST) in Script Dispater. I remember, you were saying, "I need to update the response file". Now, looks I got why would you want to do that. Again, if you update it you would not be able to use it for next time you test the same operation.
One more thing is if you send 5 accounts data as part of STEP1.REQUEST, then you might be expecting 5 records in STEP2.RESPONSE and if that changes, it should reflect the same in response, right? So, it should be very generic.
So, I am wondering, are you doing just mocking or real application development?
Also, what if some one requests for x in STEP1.REQUEST and send Y in STEP2.REQUEST -- then your idea of updating the response of 2 will not work.
You mentioned that jdbc to be queried, that would be more appropriate to use within the script dispatchers of both the operations.
STEP1.REQUEST - in mock script - read the data from request, persist into database.
STEP2.REQUEST -- in mock script -- read the request data, query for required data from database and update the response.
This both of the requests do not have to be sequential as well.
Only thing is fixed response file may not work well here in this case(applicable for both the operations).
In earlier posts, pointed some links, "how to use jdbc connection, have you tried any"?
Which database are you using here?
Hi Rao,
1) Yes, STEP1.RESPONSE can be fixed for any request.
2) Since I am using file, For second time, I use different initial file so that different account numbers which can be used again.
When I use 5 values in STEP1.REQUEST, I agree same should populate in STEP2.RESPONSE. But only 3 values I mentioned will be used back when we filter. So only 3 Values are enough.
I am only mocking here, not any dev work.
Since only X is set in global property, one and Only X cn be used in both Request.
I wanted to avoid jdbc here, as account numbers we get dynamically. Also I have updated the attached file again by adding STEP0.REQUEST and STEP0.RESPONSE.
FYI, we invoke STEP0.REQUEST and STEP2.REQUEST with same URL (same Operation). So I wanted to take the response from file and set account numbers back to file and then use again after filtering. Here is the summary of my flow again and remember that all 3 steps are not sequential.
1)Invoke STEP0.REQUEST with mode as SUBMITTEDORCORRECTED value along with ContractSolutionNumber set globally (ex SOL1234)
2) I need to get STEP0.RESPONSE present in file names SOL1234.xml
3) Above steps then invokes many transactions and we get account numbers that are invoked by STEP1.REQUEST. This request also has SOL1234 value
4)Get a fixed STEP1.RESPONSE back, so that our code assume it success and invokes further transactions.
5)Invoke STEP2.REQUEST with mode as LITE value along with globally set ContractSolutionNumber value with same URL of STEP0.REQUEST
6)Get Filtered STEP2.RESPONSE so that our code can use the same.
Note: I am also fine if its easy with 2 fixed responses. Say X.xml and Y.xml , where X and Y are set globally. X.xml is the initial file and after creating accounts write to Y.xml which can be used later.
- Apoorva69 years agoFrequent Contributor
Hi All, Any update on this please ?
Related Content
Recent Discussions
- 6 days agoruchisingh