{"id":24653960,"url":"https://github.com/mpinardi/behave-performance","last_synced_at":"2025-03-21T00:43:00.751Z","repository":{"id":205487562,"uuid":"710030993","full_name":"mpinardi/behave-performance","owner":"mpinardi","description":"A python implementation of CBDT","archived":false,"fork":false,"pushed_at":"2024-10-10T16:09:25.000Z","size":429,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T21:14:32.481Z","etag":null,"topics":["bdd","behave","cbdt","concurrent-behavior-driven-testing","load-testing","multi-processing","multi-threading","performance-testing","testing","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"Python","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,"governance":null}},"created_at":"2023-10-25T21:44:14.000Z","updated_at":"2024-10-10T15:56:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"7b463467-07df-4bb6-8694-d0426aaab8b8","html_url":"https://github.com/mpinardi/behave-performance","commit_stats":null,"previous_names":["mpinardi/behave-performance"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpinardi%2Fbehave-performance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpinardi%2Fbehave-performance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpinardi%2Fbehave-performance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpinardi%2Fbehave-performance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpinardi","download_url":"https://codeload.github.com/mpinardi/behave-performance/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244717345,"owners_count":20498283,"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","behave","cbdt","concurrent-behavior-driven-testing","load-testing","multi-processing","multi-threading","performance-testing","testing","testing-tools"],"created_at":"2025-01-25T21:14:34.039Z","updated_at":"2025-03-21T00:43:00.731Z","avatar_url":"https://github.com/mpinardi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Behave_Performance\n\nA concurrent behavior driven testing(CBDT) tool and performance testing framework for Behave.\n\n## What is Behave Performance?\nBehave Performance is a tool to simulate concurrent user behavior using gherkin features as runner specification.\n\n### What is Behave?\nBehave is a implementation of [Behavior Driven Development](https://en.wikipedia.org/wiki/Behavior-driven_development) [(BDD)](https://cucumber.io/docs/bdd/).\nWhich uses simple natural language scripts to define a software feature.\nThese executable specifications are written in a language called [Gherkin](https://cucumber.io/docs/gherkin/).\nExample:\n```\n#beer.feature\nFeature: Beer\n  Scenario: Jeff dinks a beer\n\t  Given: Jeff is of age and has a beer\n\t  And: Jeff opens his beer.\n\t  When: Jeff takes a sip.\n\t  Then: Verify he enjoyed it.\n```\n\nThese scripts can be used to develop the features themselves but also drive [automated tests](https://cucumber.io/docs/guides/10-minute-tutorial)\n\n### The issue?\nSo, you now have a working functional automation test suite.\nBut you want to run a performance test. Generally, this would require either rewriting your existing functional tests or copying a bunch of code.\nAlso, you would need to create or implement a performance test harness.\n\nMost likely each team will end up with something that is project specific and doesn't use the existing functional code base.\n\n### The fix?\nBehave Performance provides a level of automation on top of Behave.\nAnd is an implementation of a oncept called Concurrent Behavior Driven Testing (CBDT).\n\n## What is Concurrent Behavior Driven Testing?\nConcurrent Behavior Driven Testing (CBDT) is the concept of using BDD features to simulate real world concurrent events. \n\nMost systems have multiple concurrent users who may be using different but complementary features, which been previously defined in [Gherkin](https://cucumber.io/docs/gherkin/).\nCBDT allows you to document these real world situations in a simple human readable domain-specific scripting language.\n\nCBDT requires an automation team to follow strict guidelines when coding functional test cases.\nBeing careful to avoid static variables and race conditions that will cause failures in a multiple-threaded world.\nThis of course requires a larger understanding of programming or at least team leadership that can enforce these guidelines.\n\n## How does Behave Performance work?\nBehave Performance provides a means to use your existing functional tests without writing a single line of code.\nIt provides the ability to run performance simulations with support for common load testing features:\n* Timed Tests\n* Multi-Processing/Threading\n* Thread Count Limits\n* Ramp Up/Down\n* Data replacing\n* Random Wait\n* Statistics\n* Console reporting\nAnd creates a number of outputs\n* Data Points (csv)\n* Logging\n* Summary Report\n* Taurus Final Stats\n\nIt uses a new type of script called Salad.\nSalad is a re-implementation of Gherkin with the focus on performance simulations.\n\n```\nPlan: Bar visit\n\nSimulation: Jeff drinks 3 beers.\n  Group: beer.feature\n  Runners: 1\n  Count: 3\n```\n## Plans:\nHere is an example plan\n```\nPlan: test\nSimulation: simulation 1\nGroup test.feature\n\t#slices\n\t#these values will replace property \"value out\"\n\t|value out|\n\t|changed value 1|\n\t|changed value 2|\n\t#number of threads\n\tRunners: 2\n\t#total number of threads to run.\n\tCount: 2\n#a optional random wait mean for before thread runs tests.\n#thread will wait between +-50% of this mean\nRandomWait: 00:00:02\n\n#Will run all groups for the period below\nSimulation Period: simulation 2 period\nGroup test.feature\n\t|value out|\n\t|changed value |\n\t\tThreads: 5\n\t\t#count is ignored in a simulation period\n\t\tCount: 1\n#run time\nTime: 00:00:30\nRampUp: 00:00:10\nRampDown: 00:00:10\n```\n\n## Getting Started\nIt takes some planning to implement Behave Perf.\n\nYour functional automation should follow these rules:\n* Use a non specific test harness. This should standardize all your common functions.\n* Thread safety should always be in mind\n* Properly comment your features and scenarios. You want to keep track of what scenarios can be run multithreaded.\n\nFollow directions in [wiki](https://github.com/mpinardi/behave-performance/wiki) to get up and running.\n\n## Install\n  From pip:\n  \u003e pip install behave_performance\n\n  You can install with Pip from file:\n  wheel\n  \u003e  pip install behave_performance-0.5.0-py3-none-any.whl\n\n  Tar.gz\n  \u003e  pip install behave_performance-0.5.0.tar.gz\n\n## Run\n  From the commandline:\n  \u003e py behave-performance --help\n\n## Dev \n  ### Install\n    From Pipfile\n    \u003e pipenv install\n    or\n    \u003e pipenv sync\n\n    Pip from requirements:\n    \u003e  pip install -r requirements.txt\n  \n  ### Build\n    You can build with setup.py\n    \u003e  py -m build\n    \u003e  python setup.py sdist bdist_wheel\n\n  ### Test\n    You can run unit tests using pytest\n    \u003e  pytest\n\n## Versioning\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags). \n\n## License\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpinardi%2Fbehave-performance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpinardi%2Fbehave-performance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpinardi%2Fbehave-performance/lists"}