Skip to content

Commit

Permalink
Merge branch 'next' into mavengradleflag
Browse files Browse the repository at this point in the history
  • Loading branch information
KirbyKatcher authored Aug 16, 2023
2 parents 7c799e9 + 5f8174b commit 2597e7c
Show file tree
Hide file tree
Showing 5 changed files with 133 additions and 32 deletions.
30 changes: 30 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:0-18",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
8000,
9000
],

"remoteUser": "node",
"mounts": [
"source=${localWorkspaceFolderBasename}-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume"
],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "sudo chown node node_modules && npm install"

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
27 changes: 27 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Serve (Development)",
"type": "shell",
"command": "npm run develop",
"group": {
"kind": "build"
},
"isBackground": true,
"problemMatcher": []
},
{
"label": "Serve",
"type": "shell",
"command": "npm run build && npm run serve",
"group": {
"kind": "build"
},
"isBackground": true,
"problemMatcher": []
}
]
}
75 changes: 57 additions & 18 deletions src/markdown-pages/docs/cli-command-reference/runs-prepare.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ path: "/docs/cli-command-reference/ecosystem-cli-runs-prepare"
title: "Selecting tests to run in the Ecosystem"
---

The `runs prepare` command builds a portfolio of tests which can then be run by using the `runs submit` command. You can build a portfolio of tests from single or multiple [test streams](https://galasa.dev/docs/writing-own-tests/test-streams).
If you have a group of tests that you want to run in batch, the simplest way to do this is by defining these tests inside a portfolio. You can create a portfolio of tests by using the `runs prepare` command. You can build the portfolio from single or multiple [test streams](https://galasa.dev/docs/writing-own-tests/test-streams).

This portfolio of tests can then be run by using the [runs submit command](/docs/cli-command-reference/ecosystem-cli-runs-submit). When you submit the tests to run, you need specify only the portfolio name on the command, rather than listing all of the classes.

## Working with the `runs prepare` command

Expand All @@ -12,13 +14,14 @@ The following section provides a subset of examples that use the `runs prepare`

### Selecting tests from a test steam

The following example command selects tests from a test stream called `BestSoFar` for inclusion in a portfolio called `test.yaml`. All tests in the `dev.galasa.simbank.tests` package within the `BestSoFar` test stream are added to the `test.yaml` portfolio. Packages are selected if the name contains a specified string or matches the regex if --regex is specified.
The following example command selects tests from a test stream called `BestSoFar` for inclusion in a portfolio called `my_portfolio.yaml`. All tests in the `dev.galasa.simbank.tests` package within the `BestSoFar` test stream are added to the `my_portfolio.yaml` portfolio. Packages are selected if the name contains a specified string or matches the regex if --regex is specified.

On Mac or Unix:

```
galasactl runs prepare \
--portfolio test.yaml \
--bootstrap http://example.com:30960/boostrap \
--portfolio my_portfolio.yaml \
--stream BestSoFar \
--package dev.galasa.simbank.tests
```
Expand All @@ -27,22 +30,50 @@ On Windows (Powershell):

```
galasactl runs prepare `
--portfolio test.yaml `
--bootstrap http://example.com:30960/boostrap `
--portfolio my_portfolio.yaml `
--stream BestSoFar `
--package dev.galasa.simbank.tests
```

### Building a portfolio for multiple test packages

You can build a portfolio for multiple test package by using a comma separated list.

The following example command selects tests from the `dev.galasa.simbank.tests` and `dev.galasa.example.banking` test packages and adds these tests to the `my_portfolio.yaml` portfolio.

On Mac or Unix:

```
galasactl runs prepare \
--bootstrap http://example.com:30960/boostrap \
--portfolio my_portfolio.yaml \
--stream BestSoFar \
--package dev.galasa.simbank.tests,dev.galasa.example.banking
```

On Windows (Powershell):

```
galasactl runs prepare `
--bootstrap http://example.com:30960/boostrap `
--portfolio my_portfolio.yaml `
--stream BestSoFar `
--package dev.galasa.simbank.tests,dev.galasa.example.banking
```

### Selecting tests without a test stream

You can use test class names to build a portfolio when a test stream or test catalog is not available.

The following example command selects specified tests (`SimBankIVT` and `BasicAccountCreditTest`) from the `dev.galasa.simbank.tests` test package and adds these tests to the `test.yaml` portfolio.
The following example command selects specified tests (`SimBankIVT` and `BasicAccountCreditTest`) from the `dev.galasa.simbank.tests` test package and adds these tests to the `my_portfolio.yaml` portfolio.

On Mac or Unix:

```
galasactl runs prepare \
--portfolio test.yaml \
--bootstrap http://example.com:30960/boostrap \
--portfolio my_portfolio.yaml \
--class dev.galasa.simbank.tests/SimBankIVT \
--class dev.galasa.simbank.tests/BasicAccountCreditTest
```
Expand All @@ -51,7 +82,8 @@ On Windows (Powershell):

```
galasactl runs prepare `
--portfolio test.yaml `
--bootstrap http://example.com:30960/boostrap `
--portfolio my_portfolio.yaml `
--class dev.galasa.simbank.tests/SimBankIVT `
--class dev.galasa.simbank.tests/BasicAccountCreditTest
```
Expand All @@ -61,15 +93,16 @@ galasactl runs prepare `

Specifying overrides is useful if you want to run a set of tests against a particular configuration without changing the test code. For example, you might have multiple versions of software that you need to test. How can you do that without changing the test code? The answer is to use override properties. If you are running tests locally, you can set overrides properties by editing your `Overrides Properties` file. If you are running tests in an ecosystem, you can use the `--override` parameter in the Galasa CLI. Note that overrides in the portfolio take precedence over the overrides on the `runs submit` command. This is so you can set general overrides on the submit, but have specific class overrides in the portfolio.

The following example creates a portfolio called `test.yaml` that contains tests from the `BestSoFar` test stream where the test package is `dev.galasa.simbank.tests`.
The following example creates a portfolio called `my_portfolio.yaml` that contains tests from the `BestSoFar` test stream where the test package is `dev.galasa.simbank.tests`.

All the tests in the `test.yaml` portfolio will run on the z/OS LPAR `MYLPAR` in the `MYPLEX` cluster when the `galasactl runs submit --portfolio test.yaml` command is run, regardless of the LPAR and cluster that is specified in the CPS properties file.
All the tests in the `my_portfolio.yaml` portfolio will run on the z/OS LPAR `MYLPAR` in the `MYPLEX` cluster when the `galasactl runs submit --portfolio my_portfolio.yaml` command is run, regardless of the LPAR and cluster that is specified in the CPS properties file.

On Mac or Unix:

```
galasactl runs prepare \
--portfolio test.yaml \
--bootstrap http://example.com:30960/boostrap \
--portfolio my_portfolio.yaml \
--stream BestSoFar \
--package dev.galasa.simbank.tests \
--override zos.default.lpar=MYLPAR \
Expand All @@ -80,7 +113,8 @@ On Windows (Powershell):

```
galasactl runs prepare `
--portfolio test.yaml `
--bootstrap http://example.com:30960/boostrap `
--portfolio my_portfolio.yaml `
--stream BestSoFar `
--package dev.galasa.simbank.tests `
--override zos.default.lpar=MYLPAR `
Expand All @@ -92,38 +126,43 @@ galasactl runs prepare `

You can select tests by using "package" OR "bundle" OR "test". If a test is selected multiple times, it will only be added once. Duplicate tests are appended, enabling the same test to be selected multiple times with different overrides.

In the following example, the first command creates a portfolio called `test.yaml` that contains tests from the `BestSoFar` test stream where the test package name is `dev.galasa.simbank.tests`. The second command adds more tests to the `test.yaml` portfolio from the `BestSoFar` test stream where the test package name is `dev.galasa.simbank.tests.two`.
In the following example, the first command creates a portfolio called `my_portfolio.yaml` that contains tests from the `BestSoFar` test stream where the test package name is `dev.galasa.simbank.tests`. The second command adds more tests to the `my_portfolio.yaml` portfolio from the `BestSoFar` test stream where the test package name is `dev.galasa.simbank.tests.two`.

All the tests in the `test.yaml` portfolio from the `dev.galasa.simbank.tests` package will run on the z/OS LPAR `MYLPAR` in the `MYPLEX` cluster. The tests from the `dev.galasa.simbank.tests.two` package will run on the z/OS LPAR `MYLPAR2` in the `MYPLEX` cluster when the `galasactl runs submit --portfolio test.yaml` command is run.
All the tests in the `my_portfolio.yaml` portfolio from the `dev.galasa.simbank.tests` package will run on the z/OS LPAR `MYLPAR` in the `MYPLEX` cluster. The tests from the `dev.galasa.simbank.tests.two` package will run on the z/OS LPAR `MYLPAR2` in the `MYPLEX` cluster when the `galasactl runs submit --portfolio my_portfolio.yaml` command is run.

On Mac or Unix:

```
galasactl runs prepare \
--portfolio test.yaml \
--bootstrap http://example.com:30960/boostrap \
--portfolio my_portfolio.yaml \
--stream BestSoFar \
--package dev.galasa.simbank.tests \
--override zos.default.lpar=MYLPAR \
--override zos.default.cluster=MYPLEX \
galasactl runs prepare \
--portfolio test.yaml \
--bootstrap http://example.com:30960/boostrap \
--portfolio my_portfolio.yaml \
--append \
--stream BestSoFar \
--package dev.galasa.simbank.tests.two \
--override zos.default.lpar=MYLPAR2 \
--override zos.default.cluster=MYPLEX
```

On Windows (Powershell)
On Windows (Powershell):

```
galasactl runs prepare `
--portfolio test.yaml `
--bootstrap http://example.com:30960/boostrap `
--portfolio my_portfolio.yaml `
--stream BestSoFar `
--package dev.galasa.simbank.tests `
--override zos.default.lpar=MYLPAR `
--override zos.default.cluster=MYPLEX `
galasactl runs prepare `
--portfolio test.yaml `
--bootstrap http://example.com:30960/boostrap `
--portfolio my_portfolio.yaml `
--append `
--stream BestSoFar `
--package dev.galasa.simbank.tests.two `
Expand Down
30 changes: 17 additions & 13 deletions src/markdown-pages/docs/cli-command-reference/runs-submit.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ path: "/docs/cli-command-reference/ecosystem-cli-runs-submit"
title: "Running tests in the Ecosystem"
---

The `runs submit` command submits and monitors tests in the Galasa Ecosystem. Tests can be input either from a portfolio or directly from a test package.
The `runs submit` command submits and monitors tests in the Galasa Ecosystem. Tests can be input either from a portfolio or directly from a test package.

For information about creating a portfolio by using the Galasa CLI, see the documentation for the `runs prepare` command.
For information about creating a portfolio by using the Galasa CLI, see the documentation for the [runs prepare](/docs/cli-command-reference/ecosystem-cli-runs-prepare) command.

## Working with the `runs submit` command

The following section provides a subset of examples of how you can use the `runs submit` command to complete various tasks, for example, getting help, submitting tests, and setting overrides. The examples build on the Galasa SimBank tests, which you can run non-locally if you have an ecosystem that is running SimPlatform.


### Submitting tests to an ecosystem from a portfolio

The following example assumes that you have created a `test.yaml` portfolio by using the [runs prepare](./ecosystem-cli-runs-prepare) command. The command submits tests from the `test.yaml` portfolio, and specifies the following settings.
The following example assumes that you have created a `my_portfolio.yaml` portfolio by using the [runs prepare](/docs/cli-command-reference/ecosystem-cli-runs-prepare) command. The command submits tests from the `my_portfolio.yaml` portfolio, and specifies the following settings.

On Mac or Unix:

```
galasactl runs submit \
--portfolio test.yaml \
--bootstrap http://example.com:30960/boostrap \
--portfolio my_portfolio.yaml \
--poll 5 \
--progress 1 \
--throttle 5 \
Expand All @@ -31,21 +31,23 @@ On Windows (Powershell):

```
galasactl runs submit `
--portfolio test.yaml `
--bootstrap http://example.com:30960/boostrap `
--portfolio my_portfolio.yaml `
--poll 5 `
--progress 1 `
--throttle 5 `
--log -
```

where:
- `poll` specifies the frequency in seconds that the CLI polls the Ecosystem for test run status.
where:

- `portfolio` specifies the portfolio that defines the tests that you want to run
- `poll` specifies the frequency in seconds that the CLI polls the Ecosystem for test run status.
- `progress` specifies the frequency in minutes that the CLI reports the overall progress of the test runs. A value of `-1` or less disables progress reports.
- `throttle` specifies the number of test runs that can be submitted in parallel. A value of `0` or less prevents throttling.
- `log` specifies that the progress log should be directed somewhere, and the `-` means that it should be sent to the console (stderr) so it is visible.



### Submitting tests without a portfolio

You can use test class names to submit test runs without using a portfolio.
Expand All @@ -56,6 +58,7 @@ On Mac or Unix:

```
galasactl runs submit \
--bootstrap http://example.com:30960/boostrap \
--class dev.galasa.simbank.tests/SimBankIVT \
--class dev.galasa.simbank.tests/BasicAccountCreditTest \
--log -
Expand All @@ -65,6 +68,7 @@ On Windows (Powershell):

```
galasactl runs submit `
--bootstrap http://example.com:30960/boostrap `
--class dev.galasa.simbank.tests/SimBankIVT `
--class dev.galasa.simbank.tests/BasicAccountCreditTest `
--log -
Expand All @@ -73,15 +77,15 @@ galasactl runs submit `

### Setting overrides for all tests during a run

Specifying overrides is useful if you want to run a set of tests against a particular configuration without changing the test code. For example, you might have multiple versions of software that you need to test. How can you do that without changing the test code? The answer is to use override properties. If you are running tests locally, you can set overrides properties by editing your `Overrides Properties` file. If you are running tests in an ecosystem, you can use the `--override` parameter in the Galasa CLI. Note that overrides in the portfolio take precedence over the overrides on the `runs submit` command. This is so that you can set general overrides on the submit, but have specific class overrides in the portfolio.
Specifying overrides is useful if you want to run a set of tests against a particular configuration without changing the test code. For example, you might have multiple versions of software that you need to test. How can you do that without changing the test code? The answer is to use override properties. If you are running tests locally, you can set overrides properties by editing your `Overrides Properties` file. If you are running tests in an ecosystem, you can use the `--override` parameter in the Galasa CLI. Note that overrides in the portfolio take precedence over the overrides on the `runs submit` command. This is so that you can set general overrides on the submit, but have specific class overrides in the portfolio.

The following command runs all the tests in the `test.yaml` portfolio are on the z/OS LPAR `MYLPAR` in the `MYPLEX` cluster.
The following command runs all the tests in the `my_portfolio.yaml` portfolio are on the z/OS LPAR `MYLPAR` in the `MYPLEX` cluster.

On Mac or Unix:

```
galasactl runs submit \
--portfolio test.yaml \
--portfolio my_portfolio.yaml \
--override zos.default.lpar=MYLPAR \
--override zos.default.cluster=MYPLEX \
--log -
Expand All @@ -91,7 +95,7 @@ On Windows (Powershell):

```
galasactl runs submit `
--portfolio test.yaml `
--portfolio my_portfolio.yaml `
--override zos.default.lpar=MYLPAR `
--override zos.default.cluster=MYPLEX `
--log -
Expand Down
Loading

0 comments on commit 2597e7c

Please sign in to comment.