- Operating system (typically Fedora or MacOS)
- Install Node.js 20 or above (OS native packages, or nodejs, or nvm managed installs are all ok)
-
Clone automation repository and setup
git clone https://github.com/konveyor/tackle-ui-tests.git cd tackle-ui-tests npm clean-install
-
Open Cypress and run test cases
npx cypress open
Some tests require certain configuration parameters to be correctly defined in the cypress.config.ts
file. Below is a list of tests and the parameters they require.
-
export_to_jira_datacenter.test.ts
jira_stage_datacenter_project_id
jira_stage_bearer_token
jira_stage_datacenter_url
-
export_to_jira_cloud.test.ts
jira_atlassian_cloud_project
jira_atlassian_cloud_email
jira_atlassian_cloud_token
jira_atlassian_cloud_url
-
source_analysis.test.ts
andbinary_analysis.test.ts
git_user
git_password
Husky and lint-staged are used to format staged files when committing.
To manually format the cypress code: npm run format
To manually check the code formatting: npm run check
- Update Pull request with upstream main branch
- Pull requests will be tested against environment before merging to main codebase
- Pull request's owner must add RFR label once pull request is ready to test against environment
- After adding RFR label, the PR owner should force push the pull request to trigger GitHub action
- In some cases, the reviewer wants to trigger the PR test GH action but they can't force push to the PR branch. Hence added feature of triggering GH action manually. Steps to trigger GH action for PR testing manually:
- Go to Actions tab
- Click on GH action(Pull request test)
- Click on run workflow dropdown
- select PR branch
- Click on button Run workflow
This repository uses the package cypress-tags to slice up test runs.
-
To run tests based on tags, use below command
CYPRESS_INCLUDE_TAGS=@tagName npx cypress run
-
To run multiple tags(tiers) in a single run, provide tag names separated by commas
CYPRESS_INCLUDE_TAGS=@tier1,@tier2 npx cypress run
-
Install minikube on your local machine by referring to docs
-
Setup recommended minikube configurations and start minikube with the ingress addon
minikube config set memory 10240 minikube config set cpus 4 minikube start --addons=ingress
-
Install kubectl if needed, or substitute
minikube kubectl --
for allkubectl
commands. -
Install OLM manually
curl -L https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.28.0/install.sh -o install.sh chmod +x install.sh ./install.sh v0.28.0
-
Install the Konveyor operator (operator install) to the default namespace konveyor-tackle
kubectl apply -f https://raw.githubusercontent.com/konveyor/operator/main/tackle-k8s.yaml
-
Create a Tackle CR (setting the spec values as needed)
cat << EOF | kubectl apply -f - kind: Tackle apiVersion: tackle.konveyor.io/v1alpha1 metadata: name: tackle namespace: konveyor-tackle spec: feature_auth_required: false EOF
-
Wait for the tackle ingress to become available
kubectl wait -n konveyor-tackle ingress/tackle --for=jsonpath='{.status.loadBalancer.ingress[0]}' --timeout=600s
-
Once the Konveyor UI ingress is running, tests can be run against this local instance, with video captures of the tests turned on, using the command
CYPRESS_baseUrl=https://$(minikube ip) npx cypress run --config video=true
Tests include:
- “Creating source control credentials with username/password”
- “Custom Migration Targets CRUD operations”
- “Analysis for acmeair app upload binary”
- “Test inheritance after discarding application assessment and review”
- “Business service CRUD operations”
- “Stakeholder CRUD operations”
- “Migration Waves CRUD operations”
- Runs on minikube for CI testing https://github.com/konveyor/ci
- Running tests on github actions on minikube has some constraints like
- Limited resources
- Cannot run tests with credentials
- Time taken to run CI tests
Considering the above factors, we are including tests that are most necessary to test functionality of MTA while merging a PR. More tests will be added here once they're stabilized.
Tests include:
- “Source Analysis on bookserver app and its issues validation” (Current Time taken - 20-30 mins)
Basic sanity tests. Runs on stage and production and nightly runs on Konveyor CI.
Tests include:
- “Creating source control credentials with username/password
- ”Custom Migration Targets CRUD operations
- “Source Analysis on bookserver app and its issues validation”
- “Source analysis on bookserver app with EAP8 target”
- “Test inheritance after discarding application assessment and review”
- “Business service CRUD operations”
- “Migration Waves CRUD operations”
Includes analysis tests like binary and source+dependencies with credentials, runs on nightly Konveyor CI.
CRUD tests for all functionality
Sorting/filtering for all functionality
Load and performance tests.
To check if the license's header is available in all eligible files, execute:
yarn license-check-and-add check
To add the license's header to all eligible files, execute:
yarn license-check-and-add add
Refer to Konveyor's Code of Conduct here.
Branch | Mapping |
---|---|
mta_7.2.0 | MTA 7.2.0 |
release-0.6 | MTA 7.2.1 |
release-0.7 | MTA 7.3.0 |
main | Upstream development branch |