On Linux in particular, it is sometimes necessary to run a program in the background, for example a system process that loads data into a database, which is then fed data by another program being run. Although RunProgram allows the stderr and stdout files to be captured, this does not seem to work when the program is run in the background. The solution may be to implement an option to run the program in a separate thread, which TSTool would continue to track. Usually the test starts the service, loads data to it, and stops the service so hopefully by the end of the test all output files are closed and complete.
Using threads can be tricky because strays will continue to run. It may be useful to implement a ThreadManager class to track all known started threads so that TSTool can present the information to users when troubleshooting.
Subject of the issue
On Linux in particular, it is sometimes necessary to run a program in the background, for example a system process that loads data into a database, which is then fed data by another program being run. Although
RunProgram
allows thestderr
andstdout
files to be captured, this does not seem to work when the program is run in the background. The solution may be to implement an option to run the program in a separate thread, which TSTool would continue to track. Usually the test starts the service, loads data to it, and stops the service so hopefully by the end of the test all output files are closed and complete.Using threads can be tricky because strays will continue to run. It may be useful to implement a
ThreadManager
class to track all known started threads so that TSTool can present the information to users when troubleshooting.Environment