Using Java Agents - Uploading multiple files
When uploading report files to the SeaLights server, you might need to upload multiple files rather than only one.
This can be done by either provide a folder where all the files existing in it will be uploaded or alternatively upload each single file in a command line loop.
See 'Java Command Reference - Upload report files' for full parameter details
An open execution is required in order to upload a report
Upload multiple report files in a folder
java -jar sl-test-listener.jar uploadReports -tokenfile /path/to/sltoken.txt -buildsessionidfile buildSessionId.txt -reportFilesFolder "/path/to/reports/" -source "Junit xml report"
All the files in the specified folder will be uploaded regardless of their extension
Upload multiple report files using a command line loop
Sample commands - Unix
for f in /path/to/junit_report_*.xml
do
java -jar sl-test-listener.jar uploadReports -tokenfile /path/to/sltoken.txt -buildsessionidfile buildSessionId.txt -reportFile "$f" -source "Junit xml report"
done
Sample commands - Windows
for /r %i in (.\tests\Test*.xml) do java -jar sl-test-listener.jar uploadReports -tokenfile /path/to/sltoken.txt -buildsessionidfile buildSessionId.txt -reportFile %i -source "Junit xml report"