README.md 2.49 KB
Newer Older
1 2 3
# <b>How to run intergation tests</b>

## <b>Run selected test</b>
4 5 6
Use This option to run only one selected test on one device.
Available tests are in tablexia/itest/listOfAvailableITests.txt. 

7 8
<b>Desktop version</b>

9
Run selected test (jar file is in tablexia/desktop/build/libs):
10 11 12 13 14 15 16 17 18 19
```
java -jar Tablexia\ \(feature-gitlab-ci\)-iTest-<VERSION>.jar <TEST_CLASS_NAME>
```
Log file will be saved into tablexia/desktop/build/libs/iTest_results.

<b>Android version</b>

```
adb shell am start -a android.intent.action.MAIN -n cz.nic.tablexia.itest/cz.nic.tablexia.android.AndroidITestLauncher -e testClassName <TEST_CLASS_NAME>
```
20
You can run the test from Android Studio using Edit Configurations -> Launch Flags: 
21 22 23 24
```
-e testClassName <TEST_CLASS_NAME> 
```
and build variant iTest.
25
Log file will be saved into external memory of connected device in to a folder iTest_results.
26

27 28
<b>iOS version</b>

29
For running tests on iOS devices, you need a utility "ideviceinstaller"(http://macappstore.org/ideviceinstaller/)
30 31 32 33 34 35 36 37 38 39 40 41 42

Command ```ideviceinstaller -l``` shows installed applications on your connected iOS device.
For example :
```"cz.nic.tablexia.devel - Tablexia 14714714714"```

For running application on iOS device use command:
```
idevicedebug run "<APPLICATION_ID>" "<PARAMETER_1>" "<PARAMETER_2>"
```
For example:
```
idevicedebug run "cz.nic.tablexia.devel" "myParameter"
```
43
If there are more than one connected iOS devices, you need to specify what device you want to use using parameter:
44 45 46 47
```
-u "<FORTY_LOCAL_UDID_OF_DEVICE>"
```

48
<br />
49 50 51
### <b>Run set of tests using gradle</b>
Put tests, that you want to run in tablexia/itest/iTestBundle.txt (each one to one line)
You can use file listOfAvailableITests.txt to see which tests are available to use or you can use prepared sets in tablexia/itest/testSets.
52 53 54

<b>Desktop version</b>

55
Command for run desktop tests:
56 57 58
```
./gradlew desktop:runITestBundle
```
59

60 61 62 63
Tests will be run one by one as they are written in tablexia/itest/iTestBundle.txt and log files will be saved into tablexia/desktop/build/libs/iTest_results.

<b>Android version</b>

64 65 66 67
You can run set of tests on one or more connected devices at the same time.
For running tests, you must have set all connected devices to developer mode and have permition to USB debugging.

Command for run android tests:
68
```
69
./gradlew runAndroidITestBundle
70
```
71
Tests will be run one by one as they are written in tablexia/itest/iTestBundle.txt and log files will be saved into tablexia/android/build/outputs/apk/iTest_results-<DEVICENAME>/iTest_results.