Skip to content

Commit

Permalink
restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
CaroMac committed Sep 21, 2023
1 parent d4c642f commit 7e08605
Show file tree
Hide file tree
Showing 25 changed files with 262 additions and 332 deletions.
10 changes: 4 additions & 6 deletions src/data/nav.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,15 @@
items:
- title: Galasa Architecture
path: /docs/architecture
- title: Downloading and Installing
- title: Installing options
path: /docs/
- title: Prerequisites
path: /docs/prerequisites
- title: Getting started using the Galasa CLI
path: /docs/cli-command-reference/cli-command-reference
items:
items:
- title: Downloading and installing the Galasa CLI
path: /docs/cli-command-reference/installing-cli-tool
- title: Initialising your local environment
path: /docs/initialising-home-folder
- title: Exploring Galasa SimBank
path: /docs/cli-command-reference/simbank-cli
- title: Creating a project using the CLI
path: /docs/writing-own-tests/setting-up-galasa-project
- title: Running a test locally
Expand Down
2 changes: 1 addition & 1 deletion src/markdown-pages/Galasa_automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ Tests written for Galasa can be run locally on your computer for manual debuggin
<b>Environment-agnostic capabilities:</b>

- Tests can be run against multiple environments as code progresses through release stages.
- The Galasa test engine allows tests to run locally for easier development and debugging, as well as in the Galasa ecosystem for production testing at scale.
- The Galasa test engine allows tests to run locally for easier development and debugging, as well as in the Galasa Ecosystem for production testing at scale.
</details>
2 changes: 1 addition & 1 deletion src/markdown-pages/about_Galasa.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Galasa simplifies testing in such an environment. The following diagram shows an

This sophisticated solution requires end-to-end integration testing of an application that runs on different platforms (z/OS and Cloud) and uses different technologies (a 3270 emulator, JCL batch job and Selenium Web Driver).

When run inside a [Galasa ecosystem](/docs/ecosystem), a Galasa test can be invoked from an IDE or as part of a CI/CD pipeline. The Galasa framework initializes the test environment, creates valid test data, runs the test and validates the test output. As all test results and artifacts are stored in one location, it's easy to generate reports and diagnose the cause of any failures.
When run inside a [Galasa Ecosystem](/docs/ecosystem), a Galasa test can be invoked from an IDE or as part of a CI/CD pipeline. The Galasa framework initializes the test environment, creates valid test data, runs the test and validates the test output. As all test results and artifacts are stored in one location, it's easy to generate reports and diagnose the cause of any failures.


## Use Galasa to help you to:
Expand Down
19 changes: 10 additions & 9 deletions src/markdown-pages/doc_root.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
---
path: "/docs"
title: "Downloading and installing"
title: "Installing options"
---

There are a few options available for downloading and installing Galasa. Prerequisites vary, depending on the options that are chosen.
There are a few options available when installing Galasa. Prerequisites vary, depending on the option that is chosen.

You can install Galasa for using in the command-line, for using Eclipse, or for sharing with your department (using the Galasa zipped distribution).

## Download and Install options
There are benefits of installing Galasa for using in the command-line. Much of the configuration set-up that is required is done for you automatically by scripts, so less manual intervention is needed. You can then import the configuration into an IDE of your choice, rather than having to use Eclipse.

You can download Galasa as a binary of the Galasa CLI tool from the GitHub `cli` repository, or as an Eclipse plug-in, which can be downloaded either directly from an external update site, or as a zip file (zipped distribution).
If you are using only Eclipse for your IDE, do not have restricted internet access and want to use open-source Galasa you might choose to install the Galasa Eclipse plug-in directly from the external update site for using in Eclipse.

The Galasa binary that is stored in the `cli` repository is installed by using the Galasa command line (Galasa CLI). The benefit of using the command-line to install Galasa is that much of the configuration set-up that is required is done for you automatically by scripts, so there is less manual intervention needed. You can then import the configuration into an IDE of your choice.

If you are using only Eclipse for your IDE, you might choose to download the Galasa Eclipse plug-in directly from the external update site or as a zipped distribution. Users without restricted internet access who want to use open-source Galasa, can install the Galasa Eclipse plug-in directly. The zipped distribution of Galasa allows users who do not have access to Maven Central, Eclipse Marketplace and Docker Hub from their company network to use Galasa.
If you do not have access to Maven Central, Eclipse Marketplace, and Docker Hub from your company network, you can use the Galasa zipped distribution.


## Next steps

Once you have decided on your download and install options, take a look at the [Prerequisites](../markdown-pages/docs/prerequisites) documentation to find out what software you need to install.
If you are installing Galasa for using in the command-line, following the instructions in [Getting started using the CLI](/docs/cli-command-reference/cli-command-reference) documentation.

If you are installing Galasa for using in the Eclipse, or if you are installing the zipped distribution of Galasa, follow the instructions in the [Getting started using Eclipse](/docs/getting-started) documentation.

You can then choose to view either the [Getting started using the CLI](/docs/cli-command-reference/cli-command-reference) documentation or the [Getting started using Eclipse](/docs/getting-started) documentation.
To find out about the architecture of Galasa and some of its key components, take a look at the [Galasa architecture](/docs/architecture) documentation.
2 changes: 1 addition & 1 deletion src/markdown-pages/docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ path: "/docs/architecture"
title: "Architecture"
---

Read on to learn a little about Galasa's architecture and key components.
To get going with Galasa as quickly as possible, explore the [Installing options](/docs) section. Read on to learn a little about Galasa's architecture and key components.

# Galasa's architecture
At its top level, Galasa decomposes into three major components:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,8 @@ path: "/docs/cli-command-reference/cli-command-reference"
title: "Getting started using the Galasa CLI"
---

Use the Galasa command line interface (Galasa CLI) to help you complete tasks, for example, submitting and monitoring Galasa test runs. You can use the same set of Galasa CLI commands to run a given task, regardless of the technology that you are using.


## Getting started

Complete the following steps to start running the Galasa CLI tool:

On Mac or Unix:

1. Find out the architecture of your machine by typing the command `uname -m` into your terminal.
2. Download the appropriate binary of the [Galasa CLI tool](https://github.com/galasa-dev/cli/releases) for your machine architecture from the _cli_ repository in GitHub and re-name it to `galasactl`.
3. Add `galasactl` to your PATH to enable the tool to be called from the command line without having to specify the path to the directory in which it is stored. For example, ```export PATH=${PATH}:/my/folder/containing/galasactl```.
4. Set execute permission on the binary by running the `chmod +x galasactl` command in the directory containing `galasactl`.
5. Set permission to open the CLI tool by running the `spctl --add galasactl` command in the directory containing `galasactl`. You are prompted by a security panel asking you to log in to show that you are issuing the command.

You are now able to run Galasa CLI commands from the command line.


On Windows (Powershell)

1. Download the binary and re-name it to `galasactl`.
2. Add `galasactl` to your PATH to enable the tool to be called from the command line without having to specify the path to the directory in which it is stored.
3. Open `cmd.exe` and type `start galasactl.exe` in the directory containing `galasactl`.

You are now able to run Galasa CLI commands from the command line.


*Note:* It is useful to put `galasactl` in your PATH to enable the Galasa CLI tool to be called from any directory. If you are using a Mac, you can find `PATH`, and the directories stored within it, by entering the command `echo $PATH | tr ":" "\n"` in your terminal. If you are using Windows, type the command `C:\> echo %PATH%`. You can then either add the binary into a directory that is already in your PATH, or add a new directory containing the tool to your PATH.

If you are installing Galasa for using in the command-line, you can use the Galasa command line interface tool (Galasa CLI) to interact with Galasa to complete tasks, for example, submitting and monitoring Galasa test runs. You can use the same set of Galasa CLI commands to run a given task, regardless of the technology that you are using.


## About Galasa CLI commands
Expand All @@ -48,7 +21,7 @@ Go programs can sometimes struggle to resolve DNS names, especially when a worki

## Getting help

Use the following command to get more information about the command and command options, including default values.
Once you have installed the Galasa CLI, you can use the following command to get more information about the command and command options, including default values.

```
galasactl --help
Expand All @@ -66,8 +39,7 @@ You can view a list of error messages that can be output by the galasactl tool i



## Next steps




To install Galasa for using in the command line, follow the instructions in [Downloading and installing the Galasa CLI](/docs/cli-command-reference/installing-cli-tool).

Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
path: "/docs/cli-command-reference/installing-cli-tool"
title: "Downloading and installing the Galasa CLI"
---

This section provides details about prerequisite software requirements and information about how to download and install the Galasa CLI on your local machine.

## Prerequisites

| Software | Description |
| :---- | :-------- |
| Java JDK | Required. Galasa tests and Managers are written in Java - you need to install a Java version 11 JDK or later to use it. _Note:_ We do not currently support Java 17 or later. |
| Maven or Gradle | You must install either Maven or Gradle in order to build Galasa projects. Galasa projects are hierarchical file structures that provide the ability to store and run Galasa tests. All Galasa versions are compatible with Gradle releases 6.8.x and later. |
| 3270 emulator | Optional. Although you do not need a 3270 emulator to run a Galasa test (even if it tests a 3270 application) you can use one to explore Galasa Simbank, a simulated version of an application that helps you get acquainted with Galasa before connecting to a real mainframe to run your own tests. There are many such emulators available but IBM's Personal Communications (PCOMM) is frequently used, as is IBM's Host on Demand software, which includes support for Windows, Linux and MacOS.|


## Downloading the Galasa CLI

To install Galasa for using in the command-line you first need to download the binary file for the Galasa CLI from the Galasa cli respository in GitHub.

The following versions of the Galasa CLI are available to download for different operating systems and machine architectures:

| Operating system | Download |
| :---- | :-------- |
| MacOSX | galasactl-darwin-x86_64 |
| MacOSX | galasactl-darwin-arm64 |
| Linux 64-bit x86 | galasactl-linux-x86_64 |
| Linux arm64 | galasactl-linux-arm64 |
| zLinux | galasactl-linux-s390x |
| Windows | galasactl-windows-x86_64.exe |

You can find out the architecture of your machine by typing the command `uname -m` into your Mac or Linux terminal.


## Installing the Galasa CLI

Complete the following steps to install Galasa for using the command line:

On Mac or Unix:

1. Find out the architecture of your machine by typing the command `uname -m` into your terminal.
2. Download the appropriate binary of the Galasa CLI for your machine architecture from the [Galasa cli repository](https://github.com/galasa-dev/cli/releases) in GitHub and re-name it to `galasactl`.
3. Add Galasa CLI to your PATH to enable you to run CLI commands from anywhere on your file system without having to specify the absolute path. To set the path permanently, you need add the Galasa CLI path to your shell's initialization file. For example, if you downloaded the galasactl executable to a folder called `~/tools` in your home directory, you need to add `~/tools` to the list of directories that your shell searches through when you enter a command. You can do this by adding the line ```export PATH=$PATH:$HOME/tools``` to your shell’s initialization file (for example `~/.bashrc` or `~/.zshrc`). You should now be able to run the Galasa CLI too from any directory in your file system.
4. Set execute permission on the binary by running the `chmod +x galasactl` command in the directory containing `galasactl`.
5. If you are using a Mac, you can set permission to open the Galasa CLI tool by running the `spctl --add galasactl` command in the directory containing `galasactl`. You are prompted by a security panel asking you to log in to show that you are issuing the command.

You are now able to run Galasa CLI commands from the command line.


On Windows (Powershell)

1. Download the binary and re-name it to `galasactl`.
2. Add `galasactl` to your PATH to enable the tool to be called from the command line without having to specify the path to the directory in which it is stored.
3. Open `cmd.exe` and type `start galasactl.exe` in the directory containing `galasactl`.

You are now able to run Galasa CLI commands from the command line.


## Next steps

Read the [Initialising your local environment](/docs/initialising-home-folder) documentation to help you to set up some basic file structures and files in your home folder so that you can start using Galasa.







Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@ path: "/docs/cli-command-reference/cli-runs-local-debug"
title: "Debugging a test locally"
---

You can run a test locally in debug mode by using the galasactl `runs submit local` command with the `--debug` option specified. To run in debug mode, the Galasa test connects with a Java debugger on a specified port and the IDE being used is configured to connect to the same port. The test can then be launched in the Java debugger.
The following section describes how to connect your Galasa test with a Java debugger on a specified port, and then configure your IDE (IDE options covered in this topic are Microsoft VSCode,IntelliJ, and Eclipse) to connect to that same port so that you can run your test locally in debug mode.

The default value of the port is `2970`, but you can override this value adding an optional property, `galasactl.jvm.local.launch.debug.port`, into the `bootstrap.properties` file. For example, `galasactl.jvm.local.launch.debug.port=2971`. This property is ignored if the `--debug` option is not supplied to the `runs submit local` command.
## Using the debug option

You can run a test locally in debug mode by using the galasactl `galasactl runs submit local` command with the `--debug` option specified. To run in debug mode, the Galasa test connects with a Java debugger on a specified port and the IDE being used is configured to connect to the same port. The test can then be launched in the Java debugger.

The default value of the port is `2970`, but you can override this value adding an optional property, `galasactl.jvm.local.launch.debug.port`, into the `bootstrap.properties` file. For example, `galasactl.jvm.local.launch.debug.port=2971`. This property is ignored if the `--debug` option is not supplied to the `galasactl runs submit local` command.

If you need to override the value of the port that is set in the bootstrap, you can do so by using the `--debugPort` option on the `runs submit local` command. The port value itself must be an unsigned integer.

To launch multiple testcases in debug mode, add an explicit `--debugPort` option on the `galasactl runs submit local` command, so that each port is only used by one test/debugger pair at a time.

You can view the full list of options that are available with the `runs submit local` command in the
You can view the full list of options that are available with the `galasactl runs submit local` command in the
<a href="https://github.com/galasa-dev/cli/blob/main/docs/generated/galasactl_runs_submit_local.md" target="_blank">Galasa cli repository</a>.


Expand All @@ -23,7 +27,7 @@ In `listen` mode, the JVM that launches the testcase opens a debug port and paus

You can override the default value of `listen` by adding the optional property `galasactl.jvm.local.launch.debug.mode` into the `bootstrap.properties` file. For example, `galasactl.jvm.local.launch.debug.mode=attach`.

If you need to override the mode that is set in the bootstrap, you can do so by using the `--debugMode` option on the `runs submit local` command.
If you need to override the mode that is set in the bootstrap, you can do so by using the `--debugMode` option on the `galasactl runs submit local` command.



Expand Down Expand Up @@ -67,7 +71,7 @@ Complete the following steps to run a local test in debug mode using VSCode:
}
```
3. Check that the port number specified, so that when you configure the IDE the port used by the IDE matches the port number that is used by the testcase. In this example, `port` is set to `2970`, which is the default value.<br>
4. Check the value of the `request` field. The request field with a value of `attach` can be paired with the default of `listen` that is used by the `runs submit local --debug` command. Each tool must be configured with the opposite value, so one listens to the port, and the other attaches to it.
4. Check the value of the `request` field. The request field with a value of `attach` can be paired with the default of `listen` that is used by the `galasactl runs submit local --debug` command. Each tool must be configured with the opposite value, so one listens to the port, and the other attaches to it.
5. Make a note of the `name` that is specified so that you select this configuration to launch the test in the Java debugger.


Expand Down
Loading

0 comments on commit 7e08605

Please sign in to comment.