-
Fork
the repository here. -
Create a
feature
branch and start building your feature. -
Start docker daemon if it is not running.
-
Regression test your changes by running these commands.
yarn install
yarn test:e2e:setup
yarn test:e2e
-
Now, do not forget to add tests related to your feature by creating tests under
src/__tests__/e2e/
(follow the folder namingvalid
andinvalid
). -
Run
yarn test:e2e
again. -
If tests are passing, you're ready to create a
merge request
intomain
branch. Voila! 🚀
If you run into issues running above scripts then you may try these steps individually.
a. Start the following docker containers separately in multiple terminals.
yarn install
docker run --name api-manager-260 -p 127.0.0.1:8260:8243 -p 127.0.0.1:9260:9443 --rm wso2/wso2am:2.6.0
docker run --name api-manager-320 -p 127.0.0.1:8320:8243 -p 127.0.0.1:9320:9443 --rm wso2/wso2am:3.2.0
docker run --name localstack -p 127.0.0.1:4566:4566 -p 127.0.0.1:4571:4571 --rm localstack/localstack
b. Check your /etc/hosts
file for the following entry. If missing, add it and save.
127.0.0.1 localhost
c. Check if the following URLs are accessible from your browser. You should see something load up.
https://127.0.0.1:9260/services/Version https://127.0.0.1:9320/services/Version
d. Start regression tests.
yarn test:e2e
- This will run all the E2E tests.yarn test:e2e <test case>
- This will only run a specific test case matching the directory name under__tests__/e2e
.