Skip to content

Commit

Permalink
add diagram & improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fatihpense committed Sep 20, 2020
1 parent 831511e commit f4a7d41
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
# Pizug Test Tool for SAP CPI

This tool helps developers to focus on the mapping development, providing a fast feedback loop for multiple cases in the same mapping.
This tool helps developers to focus on CPI mapping development, providing a fast feedback loop for multiple cases in the same mapping.

It is best for complex mapping development. It can also be used for regression tests on developers' computers or in an automated way.
While it is best for complex mapping development, it can also be used for regression tests on developers' computers or on the server, CI/CD pipeline in an automated way.

You can store your test data forever in a human-readable format.

![Diagram Pizug Test Tool](docs/pizug-cpi-mapping-test-diagram.png)

## Prerequisites
Currently, the only prerequisite is separating your complex mappings to a [Mapping Flow](https://blogs.sap.com/2020/09/13/two-types-of-cpi-mapping-flows/). The tool works everywhere Java works. You can use your Raspberry Pi to test CPI!

## Installation & Usage

* Obtain Java 11
* You can download OpenJDK zip from [Red Hat here](https://developers.redhat.com/products/openjdk/download), For example: `jre-11.0.8-x64 ZIP | JRE 11 Windows 64-bit` (47MB)
* Download `pizug-cpi-mapping-test.jar` file from [the latest release](https://github.com/pizug/cpi-mapping-test/releases/latest)
* Prepare test cases & `pizug-test.yaml` test suite configuration file
* Run test suite with `C:\path\to\java -jar C:\path\to\pizug-cpi-mapping-test.jar` in the folder
- Obtain Java 11
- You can download OpenJDK zip from [Red Hat here](https://developers.redhat.com/products/openjdk/download), For example: `jre-11.0.8-x64 ZIP | JRE 11 Windows 64-bit` (47MB)
- Download `pizug-cpi-mapping-test.jar` file from [the latest release](https://github.com/pizug/cpi-mapping-test/releases/latest)
- Deploy router flow to your CPI tenant. Note HTTP sender address.
- Prepare test cases & `pizug-test.yaml` test suite configuration file
- Run test suite with `C:\path\to\java -jar C:\path\to\pizug-cpi-mapping-test.jar` in the folder

## Passwords
You can't write passwords to configuration file. This is to prevent committing passwords if you are using Git or sharing your test suite with eg. FTP, OneDrive/SharePoint, Dropbox.

You can run the tool with option `--password` and it will ask for your password without showing it in the terminal.
You can't write passwords to the configuration file. This is to prevent committing passwords if you are using Git or sharing your test suite with eg. FTP, OneDrive/SharePoint, Dropbox.

You can run the tool with the option `--password` and it will ask for your password without showing it in the terminal.

You can define an environment variable name. For a test suit config containing:
`password_environment_variable: "CPI_PASSWORD"` , you can set the environment variable for the terminal session as below and run the tool multiple times without requiring passwords. You can also use this method for CI/CD pipelines.

The tool will look for both passwords and pick environment variable over console provided password. If you haven't defined any, it will give error. If your password is incorrect processing will be stopped after first call to prevent locking S-user password. (After 5 consecutive failed attempts S-user password gets locked for 1 hour)
The tool will look for both passwords and pick environment variable over console provided password. If you haven't defined any, it will give error. If your password is incorrect processing will be stopped after the first call to prevent locking S-user password. (After 5 consecutive failed attempts S-user password gets locked for 1 hour)

### Setting environment variable

For Windows Powershell:

`$env:CPI_PASSWORD="yourpass"`
Expand All @@ -36,12 +46,14 @@ For Linux:
`export CPI_PASSWORD=yourpass`

## Example
You can find the example test suite in `example-test-data` folder.

You can find the example test suite in `/example-test-data` folder.

## Changelog

See [CHANGELOG.md](CHANGELOG.md)

## Blog Posts

* Announcement & usage:
<https://blogs.sap.com/2020/08/25/an-open-source-cpi-mapping-test-tool-pizug-test/>
- Announcement & usage:
<https://blogs.sap.com/2020/08/25/an-open-source-cpi-mapping-test-tool-pizug-test/>
Binary file added docs/pizug-cpi-mapping-test-diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f4a7d41

Please sign in to comment.