after getting reponse from a particular request
i need to get the value and export that particular value to .txt or csv file for each iteration.
Ex: Need to get incident number from respone and export that value to .txt or csv file.
There are different options to achieve that goal. You could use the shared queue functionality, a Javascript with Java code to write data on external file or simply the NeoLoad default logger which will store the information on each load generator log files.
See the NeoLoad documentation regarding the use of shared queue here
Basically, create a shared queue variable, use a swap file that will store your data during the test. These data will be available at the end of your test.
Extract your value and populate your shared queue with the content of your variable extractor like described in the documentation.
Please refer to that POST which describes all the steps here
Drag and drop a Javascript logical action in your script
Use the skeleton to get a value from your variable extractor (it's the context.variableManager.getValue method)
Use the "logger.debug" method to log your extracted values into the LG log files
Make sure that in the NeoLoad preferences-->Projects settings tab-->Runtime parameter, DEBUG level is selected from the drop down list.
That's it. At the end of your test, your values will be available under Results section-->Logs tab-->Each LG logs.
I have slimier requirement. I am capturing a value from response through co-relation method and i need to store this into .txt or .csv. Does above steps will work? Also is there any screenshot/Videos made on below to understand more?
Vijayashree answered
Nouredine answered
Mahammad posted a new question