Skip to content

CustomCmd usage #37

Answered by faaxm
Klemsus asked this question in Q&A
Discussion options

You must be logged in to vote

The command is not a command line command, but rather a block of code that you can trigger from the test.

So as you guessed, you would call TestServer::setGenericCommandHandler somewhere in your application (where you also set up the test server) and register some function with it. This function could then be triggered via the command call in a test.

Mostly this can be used if you control the test from a script and want to have an easy way to reset or change the state of your application without going through the GUI.
If you want to run a commandline command, you would have to write the code that calls the commandline command yourself, but could then wrap it in a CommandHandler to call it…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Klemsus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants