Blog

How to run NeoLoad command line switches

Author:

Tricentis Staff

Various contributors

Out-of-the-box, Tricentis NeoLoad command line functions are potent tools for manually launching particular actions. An originating reason for us having them added was to provide the ability for users to utilize NeoLoad with ANT.

Command line functions are also handy for essential batch script automation, which is often the required method used by other integrated applications like the Continuous Integration tool Jenkins. Additional access use cases for command line include Selenium in EUX mode, YAML for cloud load generators, or even variable injection at runtime. They can also be useful when the need arises to use a product in non-GUI mode.

Running from command line

The syntax for running a command line function, with switches, looks something like this. Get to a command prompt and ‘cd’ to change directory to your NeoLoad’s installed bin directory, (E.g., cd C:Program FilesNeoLoad 6.3bin) then at the prompt type: NeoLoadCmd -project -noGUI

  • C:archivedNeoLoad_ProjectsVanillaVanilla.nlp -launch scenario1 -report
  • C:archivedNeoLoad_ProjectsVanillareport.xml

Breaking down command switches

  1. NeoLoadCmd: starts NeoLoad.
  1. Project projects/store/store.nlp: A project file opens.
  1. Launch scenario1: This scenario starts (name must be spelled correctly).
  1. noGUI: The NeoLoad GUI not opened.
  1. Report projects/store/reports/report.xml: A report file is created.

Check out shared projects with command line

If you’re working with a Neotys Team Server (NTS) and have a shared project, you can use switches like –Collab, -CollabLogin, -checkoutProject to name a few, and can manage your collaborative project. For an in-depth view of available commands see the list of arguments.

Connecting to cloud services and NTS servers

NTSCollabPath, -NTSLogin, -NCPLogin (for Neotys Cloud Platform Login) are available switches that take input for your command line functions to work. The format must be as follows: -NCPLogin “<login>:<hashed password>” or <token> For example: -NCPLogin “loginUser:VyVmg==”

Additional switches with command line

Though there are too many to mention in this article, it’s worth noting that you can publish shared project results with -publishTestResult (though this cannot be used with GIT, it does work with NTS’s SVN mode). There is also a handy comparison switch: -comparisonReport <files> which generates test comparison reports (comma separated list of report files). The base report is set using the -baseTest argument.

Breaking down the following command

NeoLoadCmd -checkoutProject Project51 -launch “scenario1” -noGUI -NTS “http://10.0.5.11:18080” -NTSLogin “noure:QuM36humHJWA5uAvgKinWw==” -leaseLicense “MCwCFC54ZB4sNH1q9RnNrlKi7MM0q+20AhRNmr10XW3c3qIdrzSpyQbAIBCwqQ==:50:1” -exit -NTSCollabPath “/repository_1”

  • checkoutProject: This checks out the project from NTS.
  • NTS “http://192.168.0.56:18080”: This specifies the NTS server for the license and the project.
  • NTSLogin “user: AgY58iAvgK==”: This specifies the User ID for the NTS server.
  • NTSCollabPath “/repository_1”: This specifies the repository path on the NTS server.

Note: The -checkoutProject command will only use the NTS server specified if the -NTSCollabPath is also determined. Reminder to make sure to check out the full list of command arguments.

Conclusion

Command line functionality, initially added for our integration with ANT, has since evolved into a robust out-of-the-box set of tools allowing access to nearly all of the functions of runtime and results.

Author:

Tricentis Staff