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.

38 / 100


Nouredine A.
Nouredine A.

Nouredine A.

5000 / 5000

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.