Running from command line/terminal


In its 16.06 version BP-Sim comes with a new option to launch its instance from the command line/terminal. This could be very handy in situations where BP-Sim runtime is handled by a script file, run on display-less system and also to save resources when running resource draining stress tests.

While this option was implemented for BP-Source, BP-Host and BP-HSM modules, we’ll describe this feature just on the BP-Source as procedure is pretty much similar for the other.

Getting the Launch File

Start your BP-Sim installation and navigate through the main menu to Tools > Options. Select the Debug tab and you should see the screen like below. The only option provided is a checkbox there enabling/disabling the launch file generation. Now tick it and click button OK to persist the change.

Now open the Source control screen and proceed with your test configuration like you would do as usual. When done start the test by clicking the “Play” button. The log window will notify that launch file got created and print the file content for validation. File itself contains all instructions for module runtime, while application still opens its RPC port so it can be attached and commanded through BP-Sim Framework again.

Same can be done for the Load Test, but not for Batches as those require BP-Sim Framework to drive the testing on user’s behalf.

Running transactions from a command line

Launch file is by default named <module> _launch_file.json and it is generated into folder <Installation path>/BP.Sim/bin/. Running the application now is simple, all you need to do is run the module you desire with argument –file: (e.g. ./bp-source –file). In such a case BP-Source will automatically try to load file named bp_source_launch_file.json from the runtime folder. When adding a path with file name after the –file argument – any file can be loaded (e.g. ./bp-source –file ../launch_files/bp_source_configuration_1.json).

Running BP-Source in the terminal window will then output the same log as it would when started from BP-Sim Framework.

That was very easy. Now just don’t forget to un-tick the Generate Launch File checkbox to be able to launch transactions from BP-Sim Framework again.

More about BP-Sim: show

Have a look at our BP-Sim flyer: get PDF