{"id":24355188,"url":"https://github.com/mpinardi/cucumber-performance-js","last_synced_at":"2025-04-10T02:30:24.794Z","repository":{"id":34932575,"uuid":"185216416","full_name":"mpinardi/cucumber-performance-js","owner":"mpinardi","description":"A java script implementation of cucumber performance","archived":false,"fork":false,"pushed_at":"2023-03-03T18:16:43.000Z","size":1812,"stargazers_count":1,"open_issues_count":9,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T04:01:33.418Z","etag":null,"topics":["bdd","concurrent-behavior-driven-testing","cucumber","cucumber-perf","cucumber-performance","driven-testing","load-testing","multiprocess","performance-simulations","testing","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mpinardi.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}},"created_at":"2019-05-06T14:46:33.000Z","updated_at":"2023-10-26T01:02:40.000Z","dependencies_parsed_at":"2023-01-15T10:40:17.718Z","dependency_job_id":null,"html_url":"https://github.com/mpinardi/cucumber-performance-js","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpinardi%2Fcucumber-performance-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpinardi%2Fcucumber-performance-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpinardi%2Fcucumber-performance-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpinardi%2Fcucumber-performance-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpinardi","download_url":"https://codeload.github.com/mpinardi/cucumber-performance-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248019361,"owners_count":21034224,"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":["bdd","concurrent-behavior-driven-testing","cucumber","cucumber-perf","cucumber-performance","driven-testing","load-testing","multiprocess","performance-simulations","testing","testing-tools"],"created_at":"2025-01-18T17:29:28.015Z","updated_at":"2025-04-10T02:30:24.763Z","avatar_url":"https://github.com/mpinardi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cucumber-perf-js\r\nA performance testing framework for cucumber io.\r\n\r\n## What is Cucumber Perf?\r\nCucumber perf represents a new idea in automated testing development.\r\n\r\n### What is Cucumber?\r\nCucumber is a implementation of Behavior Driven Development (BDD).\r\nWhich uses simple natural language scripts to define a software feature.\r\nThese executable specifications are written in a language called gherkin.\r\nExample:\r\n```\r\nFeature: Beer\r\n  Scenario: Jeff drinks a beer\r\n  Given: Jeff is of age and has a beer\r\n  And: Jeff opens his beer.\r\n  When: Jeff takes a sip.\r\n  Then: Verify he enjoyed it.\r\n```\r\nThese scripts can be used to develop the features themselves but also drive automated tests.\r\n\r\n### The issue?\r\nSo, you now have a working functional automation test suite.\r\nBut you want to run a performance test. This would require either rewriting your existing functional tests or copying a bunch of code.\r\nAlso, you would need to create a performance test harness.\r\n\r\nMost likely each team will end up with something that is project specific and doesn't use the existing functional code base.\r\n\r\n### The fix\r\nCucumber Perf provides a level of automation on top of Cucumber.\r\nIt’s an implementation of a new concept (as far as I know) called Concurrent Behavior Driven Testing (CBDT).\r\n\r\nCucumber perf provides a means to use your existing functional code without writing a single line of code.\r\nIt provides the ability to run performance simulations with support for common load testing features:\r\n* Timed Tests\r\n* Multi-Threading\r\n* Thread Count Limits\r\n* Ramp Up/Down\r\n* Data replacing\r\n* Random Wait\r\n* Reporting\r\n* Logging\r\n\r\nIt uses a type of script called Salad.\r\nSalad is a reimplementation of Cucumber Gherkin with the focus on performance simulations.\r\n\r\n```\r\nPlan: Bar visit\r\n\r\nSimulation: Jeff drinks 3 beers.\r\n  Group: beer.feature\r\n  Runners: 1\r\n  Count: 3\r\n```\r\n## Plans:\r\nHere is an example plan\r\n```\r\nPlan: test\r\nSimulation: simulation 1\r\nGroup test.feature\r\n\t#slices\r\n\t#these values will replace property \"value out\"\r\n\t|value out|\r\n\t|changed value 1|\r\n\t|changed value 2|\r\n\t#number of threads\r\n\tRunners: 2\r\n\t#total number of threads to run.\r\n\tCount: 2\r\n#a optional random wait mean for before thread runs tests.\r\n#thread will wait between +-50% of this mean\r\nRandomWait: 00:00:02\r\n\r\n#Will run all groups for the period below\r\nSimulation Period: simulation 2 period\r\nGroup test.feature\r\n\t|value out|\r\n\t|changed value |\r\n\t\tThreads: 5\r\n\t\t#count is ignored in a simulation period\r\n\t\tCount: 1\r\n#run time\r\nTime: 00:00:30\r\nRampUp: 00:00:10\r\nRampDown: 00:00:10\r\n```\r\n## What is Concurrent Behavior Driven Testing?\r\nConcurrent Behavior Driven Testing is the methodology of creating functional automation that can be used in concurrent test scenarios.\r\nThis means coding with the understanding that each functional test could be used in a multithreaded environment.\r\n\r\nCBDT requires an automation team to follow strict guidelines when coding functional test cases.\r\nBeing careful to avoid static variables and race conditions that will cause failures in a multi-threaded world.\r\nThis of course requires a larger understanding of programing or a least team leadership that can enforce these guidelines.\r\n\r\n## Getting Started\r\nIt takes planning to implement Cucumber Perf.\r\n\r\nYour functional automation should follow these rules:\r\n* Use a non specific test harness. This should standardize all your common functions.\r\n* Do not use static variables! Your code must work in a multithreaded world.\r\n* Properly comment your features and scenarios. You want to keep track of what scenarios can be run multithreaded.\r\n\r\nFollow directions in [wiki](https://github.com/mpinardi/cucumber-performance-js/wiki) to get up and running.\r\n\r\n### Installing\r\n[npm i cucumber-perf](https://www.npmjs.com/package/cucumber-perf)\r\n\r\n## Versioning\r\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags). \r\n\r\n## License\r\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpinardi%2Fcucumber-performance-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpinardi%2Fcucumber-performance-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpinardi%2Fcucumber-performance-js/lists"}