AnsweredAssumed Answered

Test Data Creation using virtual service

Question asked by Aravind_CTS on May 24, 2017
Latest reply on Jul 7, 2017 by mazda03

Hi,

 

In my project there is a requirement for dynamic test data creation from virtual service.

 

Below said is the sample test data,

 

0000000000000A2017007111322P003003GMAC020101301  -> Header
1000000022001 00000250000 0001634129952017017 00A 0001 00002001Y -> Detail Record
1000000001158 00000072000 0002634129932017017 00A 0201 00002001 -> Detail Record
70000200199999999900000322000000002 -> Batch record
1000000001149 00000070000 0001634129952017017 00A 0101 00002002 -> Detail Record
70000200299999999900000070000000001 -> Batch Record
999999999999900000392000000003000002 -> Footer

 

My input request is SOAP request with all the above inputs, along with fields and response is above Test data.#

Currently i have a virtual service that can create static test data as above. But my requirement is to create dynamic test data through virtual service based on the inputs.

 

For Example: Number of Detail Records and batch records vary based on the requirements, my virtual service should handle that and provide me the appropriate response. Anyhow Header and Footer will always remain same.

 

2 detail records, 1 batch record

10 detail records, 2 batch records etc

 

I do understand that i have to write Java script to handle it, but am having minimal experience in that.

Request, Is anyone there who can help me on this requirement.

 

Regards,

Aravind

Outcomes