(→Usage) |
(→Adapter in action) |
||
| Line 84: | Line 84: | ||
== Adapter in action == | == Adapter in action == | ||
| - | [http://www.youtube.com/ | + | [http://www.youtube.com/watch?v=dfkoV2ygjlg File and interactive mode] |
| + | |||
| + | [http://www.youtube.com/watch?v=JbIaJZLif2A Server mode] | ||
| + | |||
| + | [http://www.youtube.com/user/meegoqatools All MeeGo QA videos] | ||
QtUiTest Model-Based-Testing Adapter (qtuitest-mbt-adapter) translates predefined keywords to QtUiTest Framework commands.
Keyword based approach is a commonly used method in (model-based) testing.
Contents |
* Qt 4.7 or higher * QtUiTest (http://qt.gitorious.org/qt-labs/qtuitest)
Set QTUITEST_SRCROOT environment variable to point in the directory, where QtUiTest source code is located.
Assuming QtUiTest source is in $HOME/qtuitest.
Linux (bash):
export QTUITEST_SRCROOT=$HOME/qtuitest
Assuming qtuitest-mbt-adapter is in $HOME/qtuitest-mbt-adapter.
Linux:
mkdir ~/qtuitest-mbt-adapter-build cd ~/qtuitest-mbt-adapter-build qmake ~/qtuitest-mbt-adapter/qtuitest-mbt-adapter.pro -recursive make make install
test: Build and run unit test
cd ~/qtuitest-mbt-adapter-build/tests/tst_<testname> make test
coverage: Build and run unit tests and test coverage analysis (requires lcov)
cd ~/qtuitest-mbt-adapter-build/tests/tst_<testname> make coverage
report: Build and run unit tests and generate HTML report from test coverage analysis (requires lcov)
cd ~/qtuitest-mbt-adapter-build/tests/tst_<testname> make report
docs: Generate HTML documentation (including keyword reference)
cd ~/qtuitest-mbt-adapter-buil make docs
$ qtuitest-mbt-adapter [options]
Examples:
# Start interactive mode $ qtuitest-mbt-adapter -i # Start adapter in MBT client mode. $ qtuitest-mbt-adapter -a localhost -p 9090
Adapter start mode options:
-i : Starts interactive mode. -f <file> : Execute keywords from a file defined in <file>. -a <address> : MBT server address to connect. <address> may be a IPV4 address or a host name. -p <port> : MBT server port to connect. -s <port> : Starts server mode. <port> defines port to be listened. -d <secs> : Delay between keywords (seconds) -h, -help, --help : Prints this help.
AUT connection options:
-authost <host> : Specify the IP address or host name of the machine on which the AUT is running.
By default, the adapter will connect to 127.0.0.1.
-autport <port> : Specify the port on which the AUT is listening for a connection. Defaults to 5656.
-sshport <port> : Specify the port to use when ssh'ing to authost. Defaults to 22.
-username <username> : Specify the user name when ssh'ing to authost.
-pwd <password> : Specify the password when ssh'ing to authost.