diff --git a/CHANGELOG.md b/CHANGELOG.md index 1137b45..169cf5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,20 +1,23 @@ # Changelog -# 0.2.0 (in development) +# 0.2.0 (2020-09-20) ### Features -* Add headers support -* Save results to respective case folders +- Add input headers support +- Save result body to respective case folder + +### Breaking changes +- Input body file names should start with `input.body` instead of just `input`. Same is true for expected files. See the example test data. # 0.1.0 (2020-08-26) ### Features -* XML comparison ignoring whitespace -* Test multiple cases at once -* Folder & configuration structure -* Command line options for entering password and specifying directory -* Colorized console output -* Router CPI Flow -* First release! +- XML comparison ignoring whitespace +- Test multiple cases at once +- Folder & configuration structure +- Command line options for entering password and specifying directory +- Colorized console output +- Router CPI Flow +- First release! diff --git a/example-test-data/mapping-case-1/expected.xml b/example-test-data/mapping-case-1/expected.body.xml similarity index 100% rename from example-test-data/mapping-case-1/expected.xml rename to example-test-data/mapping-case-1/expected.body.xml diff --git a/example-test-data/mapping-case-1/input.xml b/example-test-data/mapping-case-1/input.body.xml similarity index 100% rename from example-test-data/mapping-case-1/input.xml rename to example-test-data/mapping-case-1/input.body.xml diff --git a/example-test-data/mapping-case-1/input.header.txt b/example-test-data/mapping-case-1/input.header.txt new file mode 100644 index 0000000..9a3c11b --- /dev/null +++ b/example-test-data/mapping-case-1/input.header.txt @@ -0,0 +1,3 @@ +#Header Contents +sender_partner=111111111 +receiver_partner=999999999 diff --git a/example-test-data/pizug-run-tests.bat b/example-test-data/pizug-run-tests.bat index fade30d..6246f18 100644 --- a/example-test-data/pizug-run-tests.bat +++ b/example-test-data/pizug-run-tests.bat @@ -1,5 +1,5 @@ ECHO OFF -C:\opt\jdk-11\bin\java -jar C:\opt\jars\pizug-cpi-mapping-test.jar -d="." -p +C:\opt\jdk-11\bin\java -jar C:\opt\jars\pizug-cpi-mapping-test.jar --directory="." --password PAUSE \ No newline at end of file diff --git a/src/main/java/com/pizug/cpi/mappingtest/App.java b/src/main/java/com/pizug/cpi/mappingtest/App.java index 021d7bf..64fd503 100644 --- a/src/main/java/com/pizug/cpi/mappingtest/App.java +++ b/src/main/java/com/pizug/cpi/mappingtest/App.java @@ -32,7 +32,7 @@ import picocli.CommandLine.Command; import picocli.CommandLine.Option; -@Command(description = "Test your SAP CPI Mapping flows with your local test data", name = "pizug-cpi-mapping-test", mixinStandardHelpOptions = true, version = "0.1.0") +@Command(description = "Test your SAP CPI Mapping flows with your local test data", name = "pizug-cpi-mapping-test", mixinStandardHelpOptions = true, version = "0.2.0") public class App implements Callable { @Option(names = { "-d", @@ -146,7 +146,7 @@ private void executeTest(TestConfiguration testConfig, TestCase testCase) .header("processdirect_path", testConfig.effectiveConfig.mapping.processdirect_path) .POST(HttpRequest.BodyPublishers.ofFile(testCase.inputBody)); - if (testCase.inputHeader != null) { + if (testCase.inputHeader != null && testCase.inputHeader.toFile().exists()) { Properties inputHeaderProps = new Properties(); try (FileInputStream in = new FileInputStream(testCase.inputHeader.toFile())) { inputHeaderProps.load(in);