{"id":13604557,"url":"https://github.com/ConsenSys/quorum-acceptance-tests","last_synced_at":"2025-04-12T02:31:06.593Z","repository":{"id":40384291,"uuid":"151734001","full_name":"Consensys/quorum-acceptance-tests","owner":"Consensys","description":"Acceptance Tests for Quorum","archived":false,"fork":false,"pushed_at":"2024-06-24T13:23:28.000Z","size":12959,"stargazers_count":11,"open_issues_count":4,"forks_count":21,"subscribers_count":31,"default_branch":"master","last_synced_at":"2024-11-07T09:43:04.768Z","etag":null,"topics":["docker","features","gauge","protocols-team-goquorum","quorum","test"],"latest_commit_sha":null,"homepage":"https://github.com/ConsenSys/quorum-acceptance-tests#readme","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Consensys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-05T14:35:29.000Z","updated_at":"2024-05-02T20:33:59.000Z","dependencies_parsed_at":"2023-01-25T06:45:46.308Z","dependency_job_id":"b9e64d12-29b5-43a7-8616-95ee5ece0673","html_url":"https://github.com/Consensys/quorum-acceptance-tests","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Consensys%2Fquorum-acceptance-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Consensys%2Fquorum-acceptance-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Consensys%2Fquorum-acceptance-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Consensys%2Fquorum-acceptance-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Consensys","download_url":"https://codeload.github.com/Consensys/quorum-acceptance-tests/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248506901,"owners_count":21115503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","features","gauge","protocols-team-goquorum","quorum","test"],"created_at":"2024-08-01T19:00:47.821Z","updated_at":"2025-04-12T02:31:02.412Z","avatar_url":"https://github.com/Consensys.png","language":"Java","readme":"![Standard Acceptance Tests](https://github.com/ConsenSys/quorum-acceptance-tests/workflows/Standard%20Acceptance%20Tests/badge.svg?branch=master) \n![Extra Acceptance Tests](https://github.com/ConsenSys/quorum-acceptance-tests/workflows/Extra%20Acceptance%20Tests%20(feature-enabled%20networks)/badge.svg?branch=master) \n\n# Quick Start\n\n- Install [Docker Engine](https://docs.docker.com/engine/) or [Docker Desktop](https://www.docker.com/products/docker-desktop)\n- Run basic acceptance tests against a new GoQuorum network using Raft consensus:\n    ```\n    docker run --rm --network host -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/acctests:/tmp/acctests \\\n            quorumengineering/acctests:latest test -Pauto -Dtags=\"basic || networks/typical::raft\" \\\n            -Dauto.outputDir=/tmp/acctests -Dnetwork.forceDestroy=true\n    ```\n\n# Development\n\nDevelopment environment requires the following:\n\n- JDK 14+\n- [Gauge](https://gauge.org/get_started)\n- Run `./mvnw compile` to initiate the project with generated Java sources from Solidity source\n\nWith built-in provisioning feature:\n- [Docker Engine](https://docs.docker.com/engine/) or [Docker Desktop](https://www.docker.com/products/docker-desktop)\n- [Terraform](https://terraform.io) 0.14+\n  \n**For more details on tools and versions being used, please refer to [Dockerfile](Dockerfile)**\n\n## Writing Tests\n\n- Use [Gauge](https://github.com/getgauge/gauge) test automation framework\n- Test Specs are stored in [`src/specs`](src/specs) folder\n  - Folder `01_basic` contains specifications which describe GoQuorum's basic functionalities. All specifications must be tagged as `basic`\n  - Folder `02_advanced` contains specifications which are for making sure GoQuorum's basic functionalities are working under different conditions in the chain. All specifications must be tagged as `advanced`\n- Glue codes are written in Java under [`src/test/java`](src/test/java) folder\n- Tests are generally written against 4-node GoQuorum network\n\n## Running Tests\n\n### With auto-provisioning network\n\n\u003e :bulb: Tag `networks/typical::raft` means:\n\u003e - Executing tests which are tagged with the value\n\u003e - Instructing Maven to provision `networks/typical` with profile `raft` when using Maven Profile `auto` (i.e.: `-Pauto`)\n\u003e - `networks/typical` is a folder that contains Terraform configuration to provision the network\n\n- Run basic tests for raft consensus: \n    ```\n    ./mvnw clean test -Pauto -Dtags=\"basic || basic-raft || networks/typical::raft\"\n    ```\n- Run basic tests for istanbul consensus:\n    ```\n    ./mvnw clean test -Pauto -Dtags=\"basic || basic-istanbul || networks/typical::istanbul\"\n    ```\n- Force destroy the network after running tests:\n    ```\n    ./mvnw clean test -Pauto -Dtags=\"basic || basic-raft || networks/typical::raft\" -Dnetwork.forceDestroy=true\n    ```\n- Start the network without running tests:\n    ```\n    ./mvnw process-test-resources -Pauto -Dnetwork.target=\"networks/typical::raft\"\n    ```\n- Destroy the network:\n    ```\n    ./mvnw exec:exec@network.terraform-destroy -Pauto -Dnetwork.folder=\"networks/typical\" -Dnetwork.profile=raft\n    ```\n\nBelow is the summary of various parameters:\n\n| Parameters | Description |\n|------------|-------------|\n| `-Dnetwork.target=\"\u003cfolder\u003e::\u003cprofile\"` | Shorthand to specify the Terraform folder and profile being used to create GoQuorum Network |\n| `-Dnetwork.folder=\"\u003cfolder\u003e\"` | Terraform folder being used to create GoQuorum Network |\n| `-Dnetwork.profile=\"\u003cprofile\u003e\"` | Terraform workspace and `terraform.\u003cprofile\u003e.tfvars` being used |\n| `-Dnetwork.forceDestroy` | Destroy the GoQuorum Network after test completed. Default is `false` |\n| `-Dnetwork.skipApply` | Don't create GoQuorum Network. Default is `false` |\n| `-Dnetwork.skipWait` | Don't perform health check and wait for GoQuorum Network. Default is `false` |\n| `-Dinfra.target=\"\u003cfolder\u003e::\u003cprofile\"` | Shorthand to specify the Terraform folder and profile being used to create an infrastructure to host Docker Engine |\n| `-Dinfra.folder=\"\u003cfolder\u003e\"` | Terraform folder being used to create the infrastructure |\n| `-Dinfra.profile=\"\u003cprofile\u003e\"` | Terraform workspace and `terraform.\u003cprofile\u003e.tfvars` being used |\n| `-Dinfra.forceDestroy` | Destroy the infrastructure after test completed. Default is `false` |\n| `-Dinfra.skipApply` | Don't create the infrastructure. Default is `false` |\n| `-Dinfra.skipWait` | Don't perform health check and wait for GoQuorum Network. Default is `false` |\n| `-DskipToolsCheck` | Don't check local tools required to run tests. Default is `false` |\n| `-DskipGenerateSol` | Don't generate Java stubs for Solidity files. Default is `false`. When running Permission spec, this should not be set to `true` as the spec depends on version of Solidity files |\n\n### With local binaries\n\nIn order to run acceptance tests during GoQuorum/Tessera development:\n\n- Build GoQuorum/Tessera binaries locally targeting Linux arch.\n  E.g.: GoQuorum binaries are in `/xyz/go-ethereum/build/bin` folder and Tessera jar file is in `/abc/tessera/tessera-dist/tessera-app/target`\n- Mount binaries dynamically to overrride existing ones in the containers\n  \u003e :bulb: Indices 0,1,2,3.. indicate Node id which you want to use the local binaries\n  - GoQuorum:\n  ```\n  export QUORUM_DEV_LOCAL='{host_path=\"/xyz/go-ethereum/build/bin\", container_path=\"/usr/local/bin\"}'\n  export TF_VAR_additional_quorum_container_vol=\"{0=[$QUORUM_DEV_LOCAL],1=[$QUORUM_DEV_LOCAL],2=[$QUORUM_DEV_LOCAL],3=[$QUORUM_DEV_LOCAL]}\"\n  ````\n  - Tessera:\n  ```\n  export TESSERA_DEV_LOCAL='{host_path=\"/abc/tessera/tessera-dist/tessera-app/target\", container_path=\"/tessera\"}'\n  export TESSERA_APP_DEV_LOCAL='\"/tessera/tessera-app-20.10.1-SNAPSHOT-app.jar\"'\n  export TF_VAR_additional_tessera_container_vol=\"{0=[$TESSERA_DEV_LOCAL],1=[$TESSERA_DEV_LOCAL],2=[$TESSERA_DEV_LOCAL],3=[$TESSERA_DEV_LOCAL]}\"\n  export TF_VAR_tessera_app_container_path=\"{0=$TESSERA_APP_DEV_LOCAL,1=$TESSERA_APP_DEV_LOCAL,2=$TESSERA_APP_DEV_LOCAL,3=$TESSERA_APP_DEV_LOCAL}\"\n  ```\n\n### With custom GoQuorum/Tessera Docker images\n\nBy default, official Docker images `quorumengineering/quorum:develop` and `quorumengineering/tessera:develop` in [Docker Hub](https://hub.docker.com/u/quorumengineering) will be used.\nIf you need to use your custom images, please follow the below guides:\n\n- Name the branch with prefix `dev-`. E.g.: `dev-mybranch`\n- Push custom GoQuorum/Tessera Docker images to [Github Container Registry](https://docs.github.com/en/packages/guides/pushing-and-pulling-docker-images) of this repo with image name and version convention\n  - GoQuorum: `quorum-dev-mybranch:develop`\n  - Tessera: `tessera-dev-mybranch:develop`\n- Pushing changes to `dev-mybranch` will kick off github Action workflow running tests using custom images\n\n### With existing `quorum-examples` network\n\n```\nSPRING_PROFILES_ACTIVE=local.7nodes ./mvnw clean test -Dtags=\"basic || basic-raft || networks/typical::raft\"\n```\n\n## Remote Docker\n\n:information_source: Because Docker Java SDK [doesn't support SSH transport](https://github.com/docker-java/docker-java/issues/1130) hence we need to open TCP endpoint. \n\n`networks/_infra/aws-ec2` provides Terraform configuration in order to spin off an EC2 instance with remote Docker API\nsupport.\n\nE.g.: To start `networks/typical` with remote Docker infrastructure:\n\n- Make sure you have the right AWS credentials in your environment\n- Run: \n    ```\n    ./mvnw process-test-resources -Pauto -Dnetwork.target=\"networks/typical::raft\" -Dinfra.target=\"networks/_infra/aws-ec2::us-east-1\"\n    ```\n\n## Logging\n\n- Set environment variable: `LOGGING_LEVEL_COM_QUORUM_GAUGE=DEBUG`\n\n------\n\n[![Gauge Badge](https://gauge.org/Gauge_Badge.svg)](https://gauge.org)\n","funding_links":[],"categories":["Software components","[Ethereum](https://ethereum.org/en/)"],"sub_categories":["Testing","Whitepapers"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FConsenSys%2Fquorum-acceptance-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FConsenSys%2Fquorum-acceptance-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FConsenSys%2Fquorum-acceptance-tests/lists"}