Skip to content

Commit

Permalink
Make a start with the manual test
Browse files Browse the repository at this point in the history
  • Loading branch information
Martijn Dirkse committed May 23, 2024
1 parent ad6faa3 commit 5b101ac
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
34 changes: 34 additions & 0 deletions MANUAL_TEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Manual Test
===========

Ladybug is tested by [automated tests](./README.md#cicd). These automated tests do not cover all features of Ladybug. This document presents tests to be done manually. Please perform these tests before making a release of ladybug or a release of [ladybug-frontend](https://github.com/wearefrank/ladybug-frontend).

# Contents

- [Preparations](#preparations)

# Preparations

The options you have to run ladybug are described in [the readme](./README.md#how-to-change-and-test-ladybug). Here we present more detailed instructions. Please do the following:

* Create a work directory for performing these tests, say `work`.
* Open a command prompt and change directory to `work`.
* Clone the Frank!Runner, the Frank!Framework, ladybug and ladybug-frontend with the following commands:

* `git clone https://github.com/wearefrank/frank-runner`.
* `git clone https://github.com/frankframework/frankframework`.
* `git clone https://github.com/wearefrank/ladybug`.
* `git clone https://github.com/wearefrank/ladybug-frontend`.
* Check out the versions you want for the F!F, ladybug and ladybug-frontend. You can not choose arbitrarily what vesions to combine. A combination of versions is viable if:

* The ladybug backend version is in `work/frankframework/ladybug/pom.xml`, the line `<ladybug.version>...</ladybug.version>` under `<properties>`. That value should be the artifact version mentioned in `work/ladybug/pom.xml`.
* The ladybug-frontend you checked out should be compatible with the ladybug version you checked out. There does not have to be a match for the version numbers.
* Create file `ladybug/skip-replace-inject.txt`. It can have arbitrary contents and you can also leave it empty.
* Change directory to `work/frank-runner/specials/ladybug`.Copy `build-example.properties` to `build.properties`.
* Uncomment line `test.with.iaf=true` in the `build.properties` you created in the previous step. Uncomment some other lines if you want to speed up the build.
* Change directory to `work/ladybug-frontend/src`. Copy `proxy.ff.conf.json` to `proxy.conf.json`.
* Change directory to `work/frank-runner/specials/ladybug`. Run the command `./restart.bat`.
* Change directory to `work/ladybug-frontend`. Run the command `yarn install --immutable`.
* Execute the command `yarn ng serve`.
* To see ladybug, browse to `http://localhost:4200/`.
* To see the Frank!Framework, browse to `http://localhost`.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ This scenario does not work on forks of the ladybug project. A fork does not hav

The second use of the Cypress test is testing the front-end. The Cypress test is triggered by every commit and every pull request update of the ladybug-frontend project. The input arguments are not set, causing the new commit (or merge commit for a PR) to be checked out for ladybug-frontend. For ladybug the master is checked out. Input `useRealFrontend` is undefined, which is equivalent to `false`. This means that the front-end comes from the checkout of ladybug-frontend; the WebJar inside ladybug is ignored. Finally, `mergeMasterToBranch` is undefined (`false`). This scenario also works on forks of `ladybug-frontend`.

Before you make a release of the ladybug (backend) or ladybug-frontend, please perform the [manual tests](./MANUAL_TEST.md). The automatic tests do not cover all Ladybug functionality.

Here is how to use the CI/CD of Ladybug:

### Update the backend only
Expand All @@ -308,6 +310,6 @@ When updating the front-end, work on a branch that is allowed to live on a fork

### Update front-end and backend

Update the front-end and the backend simultaneously on your development PC. The front-end changes will fail in CI/CD because they are tested against the master of the backend. Rely on the Cypress test on your development PC and on the Maven build of ladybug to test your work. When you trust your work, release the front-end in a WebJar as explained in [Create and publish NPM package and WebJar](#create-and-publish-npm-package-and-webjar). Please note that the released commit may live on another branch than master. Ensure that the commit and the tag are pushed to GitHub project wearefrank/ladybug-frontend. Then update `pom.xml` of ladybug to reference the new WebJar; do so on a branch pushed to wearefrank/ladybug. This update of the backend triggers the GitHub actions front-end test as explained earlier. Check that the latest run of the front-end test succeeds.
Update the front-end and the backend simultaneously on your development PC. The front-end changes will fail in CI/CD because they are tested against the master of the backend. Rely on the Cypress test on your development PC and on the Maven build of ladybug to test your work. When you trust your work, merge your work into the master branch and release your work in a WebJar as explained in [Create and publish NPM package and WebJar](#create-and-publish-npm-package-and-webjar). Then update `pom.xml` of ladybug to reference the new WebJar. This update of the backend triggers the GitHub actions front-end test as explained earlier. Check that the latest run of the front-end test succeeds.

At this point, you can merge your work on ladybug to its master branch. After this merge, additional pushes on your ladybug-frontend branch will succeed in CI/CD because the corresponding backend changes are in the backend master. You can merge your front-end changes to master if the GitHub actions test succeeds.

0 comments on commit 5b101ac

Please sign in to comment.