- 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.tsjira_stage_datacenter_project_idjira_stage_bearer_tokenjira_stage_datacenter_url
-
export_to_jira_cloud.test.tsjira_atlassian_cloud_projectjira_atlassian_cloud_emailjira_atlassian_cloud_tokenjira_atlassian_cloud_url
-
source_analysis.test.tsandbinary_analysis.test.tsgit_usergit_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 allkubectlcommands. -
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 are tagged for selective execution based on purpose, stability, and resource requirements.
Use the findTierFiles.js utility to locate and run tests with specific tags:
# Find all tier0 tests
node cypress/scripts/findTierFiles.js tier0
# Run tests for a specific tier
npx cypress run --spec "$(node cypress/scripts/findTierFiles.js tier0)"
# Run tests for multiple tiers
npx cypress run --spec "$(node cypress/scripts/findTierFiles.js tier0,interop)"- Purpose: Runs on minikube for PR validation via Konveyor CI
- Constraints:
- Limited resources (minikube environment)
- Cannot use tests requiring external credentials
- Time-constrained (must complete reasonably quickly)
- Tests Include:
- Login and navigation validation
- Business service CRUD
- Job function CRUD
- Stakeholder, stakeholder group, tag, and archetype CRUD operations
- Application assessment, review, and analysis with effort and issues validation
Usage:
npx cypress run --spec "$(node cypress/scripts/findTierFiles.js ci)"- Purpose: Core smoke tests for critical functionality
- Runs on: Stage, production, and nightly on Konveyor CI
- Tests Include:
- Custom migration targets CRUD and validation
- Source analysis on bookserver app (without credentials)
- Source + dependency analysis validation
- Migration waves CRUD and application association
Usage:
npx cypress run --spec "$(node cypress/scripts/findTierFiles.js tier0)"- Purpose: Comprehensive analysis tests requiring external credentials
- Runs on: Nightly on Konveyor CI
- Tests Include:
- Binary analysis with Git credentials
- Source code analysis with credentials
- Node.js application analysis
- Python application analysis
- Upload binary analysis
Required Config: Tests need git_user and git_password configured in cypress.config.ts
Usage:
npx cypress run --spec "$(node cypress/scripts/findTierFiles.js tier1)"- Purpose: Full CRUD coverage for all features
- Test Areas: Administration (credentials, repositories, questionnaires), application inventory, controls, custom metrics, migration waves, task manager, RBAC, and analysis features
Usage:
npx cypress run --spec "$(node cypress/scripts/findTierFiles.js tier2)"- Purpose: Validate sorting, filtering, and UI interactions
- Tests Include:
- Job function filters
- Tag filters on application details
- Manual package selection for analysis
- Analysis with proxy configuration
Usage:
npx cypress run --spec "$(node cypress/scripts/findTierFiles.js tier3)"- Purpose: Load testing and performance validation
- Tests Include:
- Bulk analysis operations
- Large dataset handling
- Performance benchmarks
Usage:
npx cypress run --spec "$(node cypress/scripts/findTierFiles.js tier4)"- Purpose: Used by interOp team for testing on ROSA, ROSA-STS, and ARO clusters
- Tests Include:
- Source control credentials CRUD
- Custom migration targets CRUD
- Stakeholder CRUD operations
Usage:
npx cypress run --spec "$(node cypress/scripts/findTierFiles.js interop)"To run tests from multiple tiers in a single execution:
# Run tier0 and tier1 together
npx cypress run --spec "$(node cypress/scripts/findTierFiles.js tier0,tier1)"
# Run interop and tier0 tests
npx cypress run --spec "$(node cypress/scripts/findTierFiles.js tier0,interop)"To check if the license's header is available in all eligible files, execute:
yarn license-check-and-add checkTo add the license's header to all eligible files, execute:
yarn license-check-and-add addRefer 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 |