Skip to content

Commit

Permalink
chore: support windows on otf template (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelsonochoam committed Mar 14, 2023
1 parent bb0be68 commit 90a0e65
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
24 changes: 22 additions & 2 deletions templates/java/TestingFramework/README.md
Expand Up @@ -68,14 +68,34 @@ Prerequisites:
* Have java installed
* Have maven installed
* Build the template `mvn clean verify`
* Download the latest nucleus `curl -s https://d2s8p88vqu9w66.cloudfront.net/releases/greengrass-nucleus-latest.zip > greengrass-nucleus-latest.zip`
* Note down the path of the zip in your file system (you'll need it below)
* Download the latest nucleus
* On Linux Distros `curl -s https://d2s8p88vqu9w66.cloudfront.net/releases/greengrass-nucleus-latest.zip > greengrass-nucleus-latest.zip`
* On Windows Powershell `iwr -Uri "https://d2s8p88vqu9w66.cloudfront.net/releases/greengrass-nucleus-latest.zip" -OutFile "greengrass-nucleus-latest.zip"`
* Note down the path of the zip in your file system (you'll need it below)


From the root of the project run (make sure to replace the values)

**On Linux Distros**

`java -Dggc.archive=<path-to-nucleus-zip> -Dtest.log.path=./results -Dtags=Sample -jar ./uat/target/ComponentUATs-1.0.0-SNAPSHOT.jar`

**On Windows**

Before you can run the tests on windows you first have to Configure user credentials for Windows devices

* Download the [psexec utility](https://learn.microsoft.com/en-us/sysinternals/downloads/psexec)

* Create user in the LocalSystem account on the Windows device. Run the commands below and replace user-name with the same name of your current system user (output from the previous command) and password with a secure password.
* Run `net user user-name password /ADD`
* Run `psexec -s cmd /c cmdkey /generic:user-name /user:user-name /pass:password`


Finally run the test with

`java -"Dggc.archive"=<path-to-nucleus-zip> -D"test.log.path"=.\results -Dtags=Sample -jar .\uat\target\ComponentUATs-1.0.0-SNAPSHOT.jar`



### Making changes

Expand Down
2 changes: 1 addition & 1 deletion templates/java/TestingFramework/uat/pom.xml
Expand Up @@ -32,7 +32,7 @@
<dependency>
<groupId>com.aws.greengrass</groupId>
<artifactId>aws-greengrass-testing-standalone</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down

0 comments on commit 90a0e65

Please sign in to comment.