Unanswered question

how to get value from reponse and export to notepad

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.

Mahammad L.
Mahammad L.

Mahammad L.

Level
0
38 / 100
points

Answers

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

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.

Shared queue

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.

Javascript with Java code

Please refer to that POST which describes all the steps here

NeoLoad logger

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.

 

Vijayashree V.
Vijayashree V.

Vijayashree V.

Level
1
116 / 750
points

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?