-
Notifications
You must be signed in to change notification settings - Fork 476
GitHub Script Storage
leedonggyu edited this page Jul 31, 2020
·
1 revision
nGrinder is a SVN server itself to manage test scripts. SVN is very suitable for nGrinder, but it is an old technology. So, we added github as another script storage.
If you want to use github storage, you must create .gitconfig.yml
.
This file can be added at the script selection element.
When you select the option Add GitHub
, the file is automatically created and opened in a new window.
Key | Description |
---|---|
name | name of the setting to be displayed in the script selection element. You can add multiple github repository settings. So, it must be a unique value. |
owner | owner of repository. |
repo | name of repository. |
access-token | github personal access token. |
Key | Default | Description |
---|---|---|
branch | repository default branch | base branch for searching test scripts. |
base-url | https://api.github.com |
API base URL of github server to accesss. If you are using your own github enterprise server, you need to change this field. You can change default value in the system configuration. |
script-root | project root | root path where to start searching for the test scripts. The script search is simply based on the file extensions( .py and .groovy ), so you can find all the scripts not related to performance test.Therefore, it is recommended to save nGrinder scripts in specific folder and specify the script-root. |
You can check if your settings are valid with the validate feature.
Let's a run test with above settings.
- Scripts are cached to minimize github API calls and will be loaded when you open the script selection.
- If you update github script before the cache expires, you need to click the refresh script button.
- The test scripts can be located anywhere in the repository.
It's recommended that scripts be managed in a subfolder rather than project root.
- Resources or libraries have to be located in
resources
orlib
folder of the same depth with test script.
my_test
├── lib
│ └── my_lib.jar
├── my_test.groovy
└── resources
└── image.png
- Maven groovy script structure has the form
src/main/java/{script}
, and the pom.xml file must exist at the same depth withsrc
folder to be recognized as a maven groovy script. - Put resources in
resources
folder of same depth withjava
folder. - Maven groovy project doesn't have
lib
folder so, if you want to add some libraries for test you can do it with maven, write that in pom.xml. - If it doesn't satisfy the maven groovy project structure, it will be recognized as a normal script.
my_groovy_maven
├── pom.xml
└── src
└── main
├── java
│ └── TestRunner.groovy
└── resources
└── image.png