{"id":21304872,"url":"https://github.com/parasoft/soatest-cucumber","last_synced_at":"2025-10-07T03:11:19.043Z","repository":{"id":89650969,"uuid":"100545678","full_name":"parasoft/soatest-cucumber","owner":"parasoft","description":"Execute Cucumber test scenarios using Parasoft SOAtest","archived":false,"fork":false,"pushed_at":"2020-10-16T17:13:14.000Z","size":60,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-15T19:31:14.782Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Scilab","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/parasoft.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":"2017-08-17T00:54:32.000Z","updated_at":"2021-05-11T15:30:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"efc1b2f0-10cc-4ae7-91bd-e487bc20d92f","html_url":"https://github.com/parasoft/soatest-cucumber","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/parasoft/soatest-cucumber","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parasoft%2Fsoatest-cucumber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parasoft%2Fsoatest-cucumber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parasoft%2Fsoatest-cucumber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parasoft%2Fsoatest-cucumber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parasoft","download_url":"https://codeload.github.com/parasoft/soatest-cucumber/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parasoft%2Fsoatest-cucumber/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278712957,"owners_count":26032794,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-21T16:16:14.928Z","updated_at":"2025-10-07T03:11:19.025Z","avatar_url":"https://github.com/parasoft.png","language":"Scilab","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Parasoft SOAtest-Cucumber Executor\n\nExecute [Cucumber](https://cucumber.io) test scenarios using\n[Parasoft SOAtest](https://www.parasoft.com/product/soatest/).\n\n\n## Highlights\n\n * Implement Cucumber step definitions as\n[Parasoft SOAtest](https://www.parasoft.com/product/soatest/) test cases,\neliminating the labor and difficulty of manually coding step definitions.\n * Use JSON to create your step definitions and link them to SOAtest test cases.\n\n\n## Introduction\n\nThis java module enables you to use a JSON document to define step definitions\nthat are linked to previously-defined SOAtest test cases.  As the Cucumber\nscenarios are executed, the module will dynamically construct and configure a\nSOAtest test suite based on steps in the Cucumber feature file, then\nautomatically execute that test suite on a SOAtest server.\nThis module has no dependencies on JUnit but can be invoked from either\nCucumber's [JUnit Runner](https://cucumber.io/docs/reference/jvm#junit-runner)\nor [CLI Runner](https://cucumber.io/docs/reference/jvm#cli-runner).\n\n\n## Tutorial\n\nThe [tutorial](tutorial.md) provides step-by-step instructions for how to test\nthe ParaBank web application by executing a [Cucumber](https://cucumber.io) test\nscenario with [Parasoft SOAtest](https://www.parasoft.com/product/soatest/).\n[Click here](tutorial.md) to view the tutorial.\n\n\n## Requirements\n* [Parasoft SOAtest](https://www.parasoft.com/product/soatest/)\n* [Java 8](http://www.oracle.com/technetwork/java/javase/overview/java8-2100321.html)\n* [Apache Maven](https://maven.apache.org/)\n\n\n## How it Works\n\nWhen writing [step definitions](https://cucumber.io/docs/reference#step-definitions)\nfor Cucumber, you typically need to write code\nthat defines what should happen when a test step that matches the definition\nis executed.  This module simplifies the creation of step definitions by\nallowing you to create SOAtest tests as the implementation for what should\nhappen at each step.  Think of each step definition as a map between that step\nand a reusable SOAtest test or test suite that should get run when that step\nis executed.\n\nFor example, one step definition might reference an individual SOAtest REST Client\nthat makes a call to a REST API.  A second step definition might reference\na SOAtest REST Client with a chained JSON Assertor that validates data in a\nresponse from a different REST API.  A third step definition might reference\na SOAtest DB Tool with a chained XML Assertor that executes a DB query and\nvalidates data in the result set.  Step definitions can reference an individual\nSOAtest test or a test suite that contains a number of tests within it.\n\nYou will create a library of one or more SOAtest .tst files that contain\na number of tests and/or test suites that will be referenced by the step\ndefinitions.  These .tst files will be deployed on a SOAtest server.  As the\nCucumber scenario is executed, this module will use the SOAtest server's\nREST API to copy the test steps from your libary of .tst files into a new\n.tst file that defines the scenario.  Once all the steps are copied in, then\nthe module will run the scenario on the SOAtest server and report the results\nof the test execution back into Cucumber.\n\nTest steps can also pass data between each other by leveraging SOAtest\ntest variables.\n\n\n## General Instructions for Use\n\nFirst time users should follow the [tutorial](tutorial.md).  However, the\nfollowing steps are provided as a general reference for how to use this java\nmodule:\n\n1. **Create a library of one or more SOAtest test suite (.tst) files.**  Create\none or more SOAtest test suite (.tst) files in Parasoft SOAtest that contain the\ntests for executing each step definition.  The individual tests or\ntest suites within a single .tst file do not need to be related to each other or\nbe able to run successfully together. They are building blocks that\nwill get put together into larger scenarios defined by the Cucumber\nfeature files.\n\n   Test steps may depend on data values that get passed to them directly\nfrom the Cucumber scenario or from a previous test step.  For any fields in\nyour SOAtest test cases where the value needs to be provided dynamically, the\nfield value should have a variable reference like ${varName}.  The values\nof such variables will not be set directly in the tst file but will\nbe injected by this java module when the Cucumber scenario is being executed\nor when a Data Bank runs and saves data into a custom column.\nThis means that the test cases and scenarios you are creating in SOAtest\nwon't necessarily be able to run as-is since the values of any variables\npresent are not being set by anything in the tst file.\n\n   For variables that are injected from the Cucumber scenario file, you will need\nto define a set action within your step definition that will cause\na SOAtest test variable to be created and initialized with the value from the\nscenario.  For variables that are created by a Data Bank tool, you will need\nto ensure that the column name defined by the Data Bank and the column name\nreferenced by the test step that uses it are the same.\n\n   For reference, download and open this\n[example](src/it/resources/com/parasoft/cucumber/soatest/parabank/parabank_stepdefs.tst)\ntest suite in SOAtest.  Notice how the query parameters and JSON assertions are\nconfigured using various variables that are not actually defined in the tst\nfile.\n\n1. **Create the JSON step definitions file.**  This\nfile contains general properties that will be used when executing\nCucumber test scenarios, as well as the specific step definitions that map\ntest steps to SOAtest test cases.  See\n[this example](src/it/resources/com/parasoft/cucumber/soatest/parabank/parabank_stepdefs.json).\nHere is a description of the properties that can appear in a step definitions file:\n   * runner - Specifies properties related to the location and configuration\n   of the SOAtest server and the SOAtest .tst file that gets dynamically\n   created as the Cucumber scenarios execute.\n     * server - Specifies the base URL of the SOAtest server\n     that will be used to execute the SOAtest scenarios.  It\n     should include protocol, host, and port, such as\n     \"https://localhost:9443\".\n     * executionSuite - Specifies characteristics of the\n     SOAtest .tst file that will be dynamically created on\n     the SOAtest server as the Cucumber scenarios execute.\n       * parent - The directory on the SOAtest server\n       where the dynamically-created SOAtest .tst file will\n       be saved.\n       * name - The name of the SOAtest .tst file\n       that will be dynamically created on the SOAtest server.\n       * variables - Specifies environment variables that\n       will be automatically configured within the\n       dynamically-created SOAtest .tst file.  This is an\n       array where each object in the array has the following\n       properties:\n         * name - The name of the environment variable.\n         * value - The value of the environment variable.\n      * testConfiguration - Specifies the SOAtest test\n      configuration to use when the dynamically-created\n      SOAtest .tst file is executed.\n    * assets - Specifies test assets that will be copied from\n    your Java project to\n    the SOAtest server.  This is used to configure the SOAtest\n    server with the library of .tst files used by the\n    Cucumber scenarios.  This is an array where each object\n    in the array has the following properties:\n      * path - The name of the test asset (usually a .tst file).\n      * parent - The directory on the SOAtest server to which\n      the test asset will be copied.\n   * stepdefs\n     * step - [The type of step](https://github.com/cucumber/cucumber/wiki/Given-When-Then).\n     Possible values are \"Given\", \"When\", \"Then\", \"And\", and \"But\".\n     * pattern - The pattern used to link the step defintion\n     to the matching test steps.\n     * args - The number of arguments represented by the\n     [capture groups](https://cucumber.io/docs/reference#step-definitions)\n     in the pattern.  For example, if two\n     capture groups are defined in the pattern, then the\n     value should be set to 2.\n     * actions - Specifies the actions that should be taken\n     when a test step that matches this step definition is\n     executed.  There are two possible actions that can be\n     used:\n       * set - Specifies that a test\n       variable with a specific name should be created within\n       the dynamically-created .tst file on the SOAtest\n       server.  The format for this action is \"set:variableName\"\n       where \"variableName\" is the name of the test variable\n       that should be created.  The value will be taken from\n       the value in the Cucumber scenario that matches the\n       corresponding capture group.  If multiple capture\n       groups are defined, then multiple set actions should\n       be defined.  The first set action will be matched to\n       the first capture group, the second set action will be\n       matched to the second capture group, and so on.\n       * copy - Specifies a test case or test suite from the\n       library of SOAtest .tst files that should be linked to\n       this test step.  When the test step executes, the\n       specified test or test suite will be copied from the\n       .tst file in the libary into the .tst file that is\n       being dynamically created on the SOAtest server.  The\n       format for this action is \"copy:idOfTest\" where\n       \"idOfTest\" specifies where the test case is located\n       within the library of tests on the SOAtest server.\n       The id specifies both the path to the .tst file as\n       well as the path within the .tst file to the specific\n       test case or test suite that should be used.  For\n       example, \"/TestAssets/parabank_stepdefs.tst/Test Suite/Test Steps/CreateAccount\"\n       refers to the .tst file parabank_stepdefs.tst that\n       appears within the TestAssets project.  The top-level\n       test suite within that .tst file is named \"Test Suite\"\n       and contains a sub suite called \"Test Steps\" that\n       contains a specific test called \"CreateAccount\".\n\n   A JSON schema that describes the structure\nof the file can be found [here](src/main/schema/stepdefs.json).\n\n1. **Create a Cucumber java project.**  Follow the normal steps to create and\nconfigure a Maven java project for running cucumber tests; you can read the\ndescription from the\n[Cucumber java documentation](https://cucumber.io/docs/reference/jvm#java) for\ndetails on how this is normally done.  Your project will need a Maven pom.xml with the\n\"info.cukes:cucumber-java8\" dependency.  Additionally, you will need to do the\nfollowing in your pom.xml:\n   * Add the build.parasoft.com Maven repository which hosts releases for this\njava module:\n     ```\n     \u003crepositories\u003e\n       \u003crepository\u003e\n         \u003cid\u003eParasoft\u003c/id\u003e\n         \u003curl\u003ehttp://build.parasoft.com/maven/\u003c/url\u003e\n       \u003c/repository\u003e\n     \u003c/repositories\u003e\n     ```\n   * Add the following to the \"dependencies\" element (note that you will need\n   to update the version number to the current release version):\n     ```\n     \u003cdependency\u003e\n       \u003cgroupId\u003ecom.parasoft\u003c/groupId\u003e\n       \u003cartifactId\u003esoatest-cucumber\u003c/artifactId\u003e\n       \u003cversion\u003e0.0.2\u003c/version\u003e  \u003c!-- set this to current release version --\u003e\n       \u003cscope\u003etest\u003c/scope\u003e\n     \u003c/dependency\u003e\n     ```\n\n   Create a \"src/test/java/*your_java_package*\" source directory with a single\nJava class that extends cucumber.api.java8.GlueBase or one if its subclasses\n(such as cucumber.api.java8.En) as shown in the\n[lambda expressions](https://cucumber.io/docs/reference/jvm#lambda-expressions-java-8)\nexample.  However, don't manually code any step definitions in the constructor.\nInstead, add a single line to the constructor which calls\nStepDefinitionLoader.loadStepDefinitions() as seen in\n[this example](src/it/java/com/parasoft/cucumber/soatest/parabank/ParaBankStepDefinitions.java).\n\n   Put your step definition file and the library of SOAtest .tst files in the\n\"src/test/resources/*your_java_package*\" source directory.\n\n   (Optional) If you wish to use Cucumber's JUnit Runner as opposed to their\nCLI Runner, then under \"src/test/java/*your_java_package*\" create an empty\nJava class annotated with \"@RunWith(Cucumber.class)\" as described\n[here](https://cucumber.io/docs/reference/jvm#junit-runner).  Also see\n[this example](src/it/java/com/parasoft/cucumber/soatest/parabank/ParaBankIT.java).\n\n\n## How to Execute\n\n1. **Start your Parasoft SOAtest Server.**  Make sure your SOAtest server is\naccessible at the server URL defined in the JSON step definitions file.\n\n1. **Deploy your application under test.**  It must be accessible from the host\nwhere the SOAtest Server is deployed.\n\n1. **Run your Cucumber scenario.**  From Maven this would typically be\n\"mvn clean test\" to run JUnits under \"src/test/java\" or \"mvn clean verify\" if\nyour test sources were added as integration tests under \"src/it/java\" as in\n[this example](src/it/java/com/parasoft/cucumber/soatest/parabank).\n\n\n## Example\n\nThis project includes an example for executing a Cucumber test scenario against\n[ParaBank](https://github.com/parasoft/parabank).  For step-by-step\ninstructions for how this example was constructed, please follow the\n[tutorial](tutorial.md).  Otherwise, to simply execute this example, follow\nthese steps:\n1. Checkout and build ParaBank.  View the README on the\n[ParaBank project page](https://github.com/parasoft/parabank)\nfor instructions.\n1. Deploy the parabank.war into a Tomcat Server on the same machine that has\nSOAtest server.  In your Tomcat installation directory, edit the conf/server.xml\nto listen on port 8090 instead of 8080.\n1. Start your Tomcat server and verify you can access ParaBank on\nhttp://localhost:8090/parabank\n1. Start your SOAtest server.\n1. Checkout this project and run \"mvn -P integration-tests clean verify\".  You\nshould see the following output from Apache Maven:\n   ```\n   [INFO] -------------------------------------------------------\n   [INFO]  T E S T S\n   [INFO] -------------------------------------------------------\n   [INFO] Running com.parasoft.cucumber.soatest.parabank.ParaBankIT\n   Feature: ParaBank accounts\n     Create and use accounts in ParaBank\n   Test Execution - waiting on tests to complete.\n   Test Execution of [/TestAssets/ParaBankTests.tst] completed.\n   Test Execution of [/TestAssets/ParaBankTests.tst], results (failures/total): 0/2\n\n     Scenario: Create a new loan account    # com/parasoft/cucumber/soatest/parabank/parabank.feature:4\n       Given I am user 12212                # StepDefinitionLoader.java:114\n       And using funds from account 54321   # StepDefinitionLoader.java:114\n       When I create a new loan account     # StepDefinitionLoader.java:114\n       Then A new loan account should exist # StepDefinitionLoader.java:114\n\n   1 Scenarios (1 passed)\n   4 Steps (4 passed)\n   0m10.068s\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparasoft%2Fsoatest-cucumber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparasoft%2Fsoatest-cucumber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparasoft%2Fsoatest-cucumber/lists"}