Created
August 9, 2019 07:46
-
-
Save wa1one/b1efa0b4ad2122c9240d7456d0791b67 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Environment settings | |
1. Install Java [JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) | |
2. Install Intellij [IDE](https://www.jetbrains.com/idea/) | |
3. Install Gradle build system. [More details](https://gradle.org/install/) | |
4. Open project with tests in IDE | |
5. Open in IDE *File* -> *Project Structure* set project SDK. Click *New* -> + *JDK*. Set path to installed JDK | |
6. Open in IDE *File* -> *Settings* -> *Plugins*. Search plugin "*Cucumber for Java*". IDE displayed "No plugins found". Click "Search in repositories". Click *Install* | |
7. At **HooksWeb** change ip and port of application | |
8. At **HooksWeb** change all path on your path | |
- Runtime.getRuntime().exec(.. | |
9. Refresh project with tests. | |
# To run tests from command line | |
1. Open folder with project | |
2. Open file build.greadle by text redactor | |
3. Select in 25 row build.gradle feature you need to test, for example: | |
-- 'src/main/resources/' - means all features from resources will run | |
--'src/main/resources/Console.feature' - means only Console.feature will run | |
4. Save your changes | |
5. Run TSHMI on http://localhost:8000 | |
6. In folder with tests project open console (cmd or Git Bash) | |
7. Execute ***gradle cucumber*** | |
# Passing arguments from command line | |
to pass IP address: | |
-Dip - IP (default=172.31.239.158) | |
to pass port: | |
-Dport - port (default=8444) | |
to reboot unit before start: | |
-Dreboot - bool (default=false) | |
Example: gradle cucumber -Dip=111.111.111 -Dport=8081 -Dreboot=true | |
# FOR run cucumber tests on Ubuntu 18.04: | |
## Environment settings | |
1. Install Git | |
* we should start out by running general OS and package updates. On Ubuntu we�~@~Yll do this by running: | |
**$ apt-get update**; | |
* install Git: | |
**$ sudo apt install git**; | |
* check git version: | |
**$ git --version**; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$ sudo apt install default-jre;
$ sudo apt install default-jdk
$ java -version;
$ sudo update-alternatives --config java;
$ sudo nano /etc/environment
JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/"
Important: delete "bin/java" from the end of the path!
$ source /etc/environment
$ echo $JAVA_HOME;
$ wget https://services.gradle.org/distributions/gradle-5.2.1-bin.zip -P /tmp;
$ sudo unzip -d /opt/gradle /tmp/gradle-5.2.1-bin.zip
$ ls /opt/gradle/gradle-5.2.1;
$ sudo nano /etc/profile.d/gradle.sh
export GRADLE_HOME=/opt/gradle/gradle-5.2.1
export PATH=${GRADLE_HOME}/bin:${PATH}
$ sudo chmod +x /etc/profile.d/gradle.sh
$ source /etc/profile.d/gradle.sh
$ gradle -v;
$ sudo apt-get install cucumber