An Open-Source CPI Mapping Test Tool: Pizug Test
Hello CPI Developers,
I have developed a CPI mapping regression test tool that ticks the right boxes for me and I’m pleased to share it with the community! Let’s see how it can be useful to you.
Table of Contents
- How to use
- Advantages & Disadvantages
It is basically a client program that reads the configuration and test data from regular directories. Then, it executes each case and compares the mapping result with the expected result. Finally, the tool shows the test results and stats.
How to Use
After the configuration, you only have to run a .bat file
Enter your password and wait for the tests to complete:
You can’t store your password in the configuration file. You can only store “environment variable name” for the password. If you want to test it again and again you can set an environment variable for the terminal session and run the Jar without “-p” parameter.
C:\opt\jdk-11\bin\java -jar C:\opt\jars\pizug-cpi-mapping-test.jar -d="."
Advantages & Disadvantages
Things I like about it:
- Everything is a file:
- You can open your EDI or XML examples in your favorite editor, whenever you want
- You can share your test cases in traditional ways
- You can add related documentation next to the cases
- You can integrate the data with other tools.
- You can run it on your computer or in a CI/CD pipeline
- Anyone else loves Open-source?
- It should be as fast as your computer
- You have to model your mappings as separate flows
- You have to hand-craft your test cases
- It is a terminal-only tool and the documentation leaves a lot to be desired
- Currently, it only supports mappings with XML outputs
Go to releases page in Git repository:
You should see:
- The tool Jar itself
- You can download any Java version 11 or above(it can be a portable version). Note down the path for the Java executable.
- Add the Jar in a convenient directory. Note down the path.
- CPI Package that contains the simple router flow and an example mapping flow.
- Import the package and deploy the router flow.
- An example test suite data that you can run with the included mapping flow above. It contains the configuration and a batch file (.bat) example.
- Once you change the batch or configuration Yaml file, you can copy & reuse them.
You need to change host and username parameters, then you can test the example mapping flow.
There are many roads to follow from here. The good thing is that we can discuss use cases, features, or possibilities together in the Git repository!
Thanks for reading!