includes example and test; new command echo
This commit is contained in:
33
examples/SwissSign_Silver_CA_-_G2.pem
Normal file
33
examples/SwissSign_Silver_CA_-_G2.pem
Normal file
@@ -0,0 +1,33 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UE
|
||||
BhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWdu
|
||||
IFNpbHZlciBDQSAtIEcyMB4XDTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0Nlow
|
||||
RzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMY
|
||||
U3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
|
||||
MIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644N0Mv
|
||||
Fz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7br
|
||||
YT7QbNHm+/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieF
|
||||
nbAVlDLaYQ1HTWBCrpJH6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH
|
||||
6ATK72oxh9TAtvmUcXtnZLi2kUpCe2UuMGoM9ZDulebyzYLs2aFK7PayS+VFheZt
|
||||
eJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5hqAaEuSh6XzjZG6k4sIN/
|
||||
c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5FZGkECwJ
|
||||
MoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRH
|
||||
HTBsROopN4WSaGa8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KMPqN5ZprFQFOZ6raYlY+
|
||||
hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ubDgEj8Z+7fNzcbBGXJbLy
|
||||
tGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u
|
||||
-----END CERTIFICATE-----
|
21
examples/makefile.am
Normal file
21
examples/makefile.am
Normal file
@@ -0,0 +1,21 @@
|
||||
## @id $Id$
|
||||
#
|
||||
# This file has been added by bootstrap.sh on Sat, 10 October 2015 12:52:56 +0200
|
||||
# Feel free to change it or even remove and rebuild it, up to your needs
|
||||
#
|
||||
## 1 2 3 4 5 6 7 8
|
||||
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
|
||||
AM_CPPFLAGS = -I${top_srcdir}/src -I${top_builddir}/src
|
||||
AM_LDFLAGS = -L${abs_top_builddir}/src/.libs
|
||||
LDADD = -lwebtester
|
||||
|
||||
TESTS = test-commands.wt
|
||||
TEST_EXTENSIONS = .wt
|
||||
WT_LOG_COMPILER = ${top_builddir}/src/webrunner
|
||||
AM_WT_LOG_FLAGS = -x test-output.xml -p ${srcdir}
|
||||
|
||||
EXTRA_DIST = ${TESTS} SwissSign_Silver_CA_-_G2.pem
|
||||
|
||||
CLEANFILES = test-output.xml attachments
|
||||
MAINTAINERCLEANFILES = makefile.in attachments
|
65
examples/test-commands.wt
Normal file
65
examples/test-commands.wt
Normal file
@@ -0,0 +1,65 @@
|
||||
## @file This is a test script to test and to show the features of the webtester framework.
|
||||
|
||||
testsuite Test WebTester Commands
|
||||
|
||||
testcase Test Certificate Load
|
||||
# Load a SwissSign root certificate, so that it is accepted in the
|
||||
# following tests. Normally this is only necessary if you use
|
||||
# self-signed certificates, that are unknown by qt.
|
||||
ca-certificate SwissSign_Silver_CA_-_G2.pem
|
||||
|
||||
testcase Test Variable Definition
|
||||
# set a variable to a value
|
||||
set ARG4 = Argument number 4
|
||||
# set a variable to the output of a system command
|
||||
set WORKDIR
|
||||
execute pwd
|
||||
|
||||
testcase Test Function Call
|
||||
# call a test function with three comma separated arguments
|
||||
# - either with single quotes, allmust be quoted
|
||||
call test '1', 'hello world', 'here is a comma, so it must be quoted', 'ARG4'
|
||||
# - or with double quotes, but the two types cannot be mixed
|
||||
call test "2", "hello world", "here's a comma, so it must be quoted", "ARG4"
|
||||
# - or with no quotes
|
||||
call test 3, hello world, here's no comma and no quotes, ARG4
|
||||
|
||||
testcase Test Function Definition
|
||||
## Just a test function
|
||||
## @param ARG1 an argument
|
||||
## @param ARG2 another argument
|
||||
## @param ARG3 another argument
|
||||
## @param ARG4 another argument
|
||||
function test ARG1, ARG2, ARG3, ARG4
|
||||
if ARG1 = 1
|
||||
# this is the first function call (or at leas declared to be the first)
|
||||
echo This is the first call of function "test"
|
||||
echo called funtion test ARG1, ARG2, ARG3, ARG4
|
||||
|
||||
testcase Test Checks
|
||||
# check comparisions of values
|
||||
# fist set some variables to test
|
||||
set TEXT = Hello world, this is a test.
|
||||
set TWO = 2
|
||||
# then so some checks
|
||||
check TWO = 2
|
||||
check 2 = TWO
|
||||
check TWO = TWO
|
||||
check TEXT = Hello world, this is a test.
|
||||
check TEXT ^ hello world
|
||||
check TEXT ~ [hH]ello.*test
|
||||
check TEXT ~ world
|
||||
check 1 < TWO
|
||||
check TWO < 3
|
||||
check 3 > TWO
|
||||
|
||||
testcase Test Setting Clicktype
|
||||
# there are two clicktypes:
|
||||
# - normal javascript this.click(); call
|
||||
# - Qt emulated real mouse click
|
||||
clicktype realmouse
|
||||
clicktype javascript
|
||||
|
||||
testcase Test Load Client Certificate
|
||||
# define a client certificate to authenticate to a server
|
||||
#client-certificate certfile.pem keyfile.pem mypassword
|
Reference in New Issue
Block a user