I have a set of PCAPs. I need to create a virtual service from them (which is easy), but I also need to create CA Application Tests from them as well.
Does anyone have a method of creating tests from PCAPs?
Thanks! - john
One of my prospect also has the request to create test from pcaps.
I would like to understand the value provided by this kind of functionality. What facilities to provide a complete test are gained by grabbing the actual messages from a PCAP?
To explain a little, a test may comprise a number of things:
Firstly, make sure all work will conform to the methodology of the testing effort. This could include Behaviour-Driven Development, Test-Driven Development, Data-Driven Testing, Show-And-Tell Testing, Risk-Based Testing, Requirements-Driven Testing, etc. Then:
1. Get the data you want to use
2. Manipulate the data into formats that make sense to the test, conform to compliance standards, include a range of functionality, etc.
3. Determine where to send data
4. Determine what constitutes "success" for that data
5. Determine data sets, filters and assertions to make the submission of that data useful
6. Increase the scope of the data submission to include negative scenarios
7. Work out whether the test is for component testing, system testing, integration testing, regression testing and/or performance testing
8. Construct the test, comprising the data, the structure, the assertions, the filters, "invoke-and-verify" techniques for testing multiple layers of the SUT, loops around any unbound data elements, etc
9. Stage the suite of tests that include the test.
If I understand correctly, generating a test from PCAP would provide the structure of a message into a test step, which is a component of point 8 above. It is simple enough to do that, by generating a virtual service from PCAP, and then either:
1. write a test that will parse the service image file to extract the raw recorded request and the associated response (the "bd" section(s) in the corresponding "rp" block(s) for the request) to store as files and load as data into a template test.
2. Add the CAI companion to the service model, so you create baselines inside CAI whenever anyone uses the virtual service, for extraction into tests at a later date.
Is this the only piece that you want to automate by generating tests from PCAP? It might be that there are better candidates in the testing process for increasing the level of automation.
Retrieving data ...