{"id":28399403,"url":"https://github.com/codeception/robo-paracept","last_synced_at":"2025-06-28T19:31:11.000Z","repository":{"id":16545890,"uuid":"19299516","full_name":"Codeception/robo-paracept","owner":"Codeception","description":"Robo tasks for Codeception tests parallel execution","archived":false,"fork":false,"pushed_at":"2024-05-20T18:36:34.000Z","size":285,"stargazers_count":57,"open_issues_count":9,"forks_count":62,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-06-23T01:35:11.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/Codeception.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2014-04-30T03:19:30.000Z","updated_at":"2024-09-13T06:58:11.000Z","dependencies_parsed_at":"2023-01-13T18:53:51.709Z","dependency_job_id":"56a0368f-f4bc-478a-9797-00d4c8632276","html_url":"https://github.com/Codeception/robo-paracept","commit_stats":{"total_commits":95,"total_committers":28,"mean_commits":3.392857142857143,"dds":0.6526315789473685,"last_synced_commit":"270003825877fbbb7c8d150fca121b57fae06313"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/Codeception/robo-paracept","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codeception%2Frobo-paracept","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codeception%2Frobo-paracept/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codeception%2Frobo-paracept/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codeception%2Frobo-paracept/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Codeception","download_url":"https://codeload.github.com/Codeception/robo-paracept/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codeception%2Frobo-paracept/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262483975,"owners_count":23318373,"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":[],"created_at":"2025-06-01T08:09:00.912Z","updated_at":"2025-06-28T19:31:10.994Z","avatar_url":"https://github.com/Codeception.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"robo-paracept\n=============\n\n[![PHP Composer](https://github.com/Codeception/robo-paracept/actions/workflows/php.yml/badge.svg)](https://github.com/Codeception/robo-paracept/actions/workflows/php.yml)\n[![Latest Stable Version](https://poser.pugx.org/codeception/robo-paracept/version)](https://packagist.org/packages/codeception/robo-paracept)\n[![Total Downloads](https://poser.pugx.org/codeception/robo-paracept/downloads)](https://packagist.org/packages/codeception/robo-paracept)\n[![License](https://poser.pugx.org/codeception/robo-paracept/license)](https://packagist.org/packages/codeception/robo-paracept)\n\nRobo tasks for Codeception tests parallel execution. Requires [Robo Task Runner](https://robo.li)\n\n## Install via Composer\n\n```\ncomposer require codeception/robo-paracept --dev\n```\n\nInclude into your RoboFile\n\n```php\n\u003c?php\n\nrequire_once 'vendor/autoload.php';\nrequire_once 'vendor/codeception/codeception/autoload.php';\n\nclass RoboFile extends \\Robo\\Tasks\n{\n    use Codeception\\Task\\Merger\\ReportMerger;\n    use Codeception\\Task\\Splitter\\TestsSplitterTrait;\n}\n```\n\n## Idea\n\nParallel execution of Codeception tests can be implemented in different ways.\nDepending on a project the actual needs can be different.\nSo we prepared a set of predefined Robo tasks that can be combined and reconfigured to fit your needs.\n\n## Tasks\n\n### SplitTestsByGroups\n\nLoad tests from a folder and distributes them between groups.\n\n```php\n$result = $this-\u003etaskSplitTestsByGroups(5)\n    -\u003etestsFrom('tests/acceptance')\n    -\u003eprojectRoot('.')\n    -\u003egroupsTo('tests/_data/group_')\n    -\u003erun();\n\n// task returns a result which contains information about processed data:\n// optionally check result data   \nif ($result-\u003ewasSuccessful()) {\n    $groups = $result['groups'];\n    $tests = $result['tests'];\n    $filenames = $result['files'];\n}\n```\n\n\u003e This command **loads Codeception into memory**, loads and parses tests to organize them between group. If you want just split test file and not actual tests (and not load tests into memory) use `taskSplitTestFilesByGroups`:\n\n### SplitTestFilesByGroups\n\nTo split tests by suites (files) without loading them into memory use `taskSplitTestFilesByGroups` method:\n\n```php\n$result = $this-\u003etaskSplitTestFilesByGroups(5)\n   -\u003etestsFrom('tests')\n   -\u003egroupsTo('tests/_data/paratest_')\n   -\u003erun();\n\n// optionally check result data\nif ($result-\u003ewasSuccessful()) {\n    $filenames = $result['files'];\n}   \n```\n\n### SplitTestsByTime\n\nEnable extension for collect execution time of you use taskSplitTestsByTime\n\n```\nextensions:\n    enabled:\n        - Codeception\\Task\\Extension\\TimeReporter\n```\n\nLoad tests from a folder and distributes them between groups by execution time.\n\n```php\n$result = $this-\u003etaskSplitTestsByTime(5)\n    -\u003etestsFrom('tests/acceptance')\n    -\u003eprojectRoot('.')\n    -\u003egroupsTo('tests/_data/group_')\n    -\u003erun();\n\n// optionally check result data\nif ($result-\u003ewasSuccessful()) {\n    $filenames = $result['files'];\n}\n```\n\nthis command need run all tests with `Codeception\\Task\\TimeReporter` for collect execution time. If you want just split tests between group (and not execute its) you can use SplitTestsByGroups. **Please be aware**: This task will not consider any 'depends' annotation!\n\n### SplitFailedTests\n\nEnable extension for collect failed tests if you use taskSplitFailedTests  \nThe extension saves the report files into \\Codeception\\Configuration::outputDir()\n\n```\nextensions:\n    enabled:\n        - Codeception\\Task\\Extension\\FailedTestsReporter\n```\n\nMerge the created report files from the FailedTestsReporter into single file\n```php\n$this-\u003etaskMergeFailedTestsReports()\n    -\u003efromPathWithPattern(\\Codeception\\Configuration::outputDir(), '/failedTests_\\w+\\.txt$/')\n    -\u003einto(\\Codeception\\Configuration::outputDir() . 'failedTests.txt') // absolute path with Filename\n    -\u003erun();\n```\n\nLoad the failed Tests from a reportfile into the groups:\n```php\n$result = $this\n    -\u003etaskSplitFailedTests(5)\n    -\u003esetReportPath(\\Codeception\\Configuration::outputDir() . 'failedTests.txt') // absoulute Path to Reportfile\n    -\u003egroupsTo(\\Codeception\\Configuration::outputDir() . 'group_')\n    -\u003erun();\n\n// optionally check result data\nif ($result-\u003ewasSuccessful()) {\n    $filenames = $result['files'];\n} \n```\n\n### MergeXmlReports\n\nMergex several XML reports:\n\n```php\n$this-\u003etaskMergeXmlReports()\n    -\u003efrom('tests/result/result1.xml')\n    -\u003efrom('tests/result/result2.xml')\n    -\u003einto('tests/result/merged.xml')\n    -\u003erun();\n```\n\n\n### MergeHtmlReports\n\nMergex several HTML reports:\n\n```php\n$this-\u003etaskMergeHtmlReports()\n    -\u003efrom('tests/result/result1.html')\n    -\u003efrom('tests/result/result2.html')\n    -\u003einto('tests/result/merged.html')\n    -\u003erun();\n```\n\n\n## Filters\n\nYou can use a custom filter to select the necessary tests.\n\nTwo filters already included: DefaultFilter, GroupFilter\n\n* **DefaultFilter** is enabled by default, takes all tests.\n* **GroupFilter** _(Can only be used by taskSplitTestsByGroups)_, allows you to filter the loaded tests by the given groups. You have the possibility to declare groups which you want to include or exclude. If you declare foo and bar as included, only tests with this both group annotations will be matched. The same thing is happend when you add excluded groups. If you combine the included and excluded group the only tests which have exactly the correct group annotations for the included items and none of the excluded items.\n\nYou can add as many filters as you want. The FIFO (First In - First Out) principle applies. The next filter will only get the result of the filter before.\n\n### Usage\n\nFor example, you want all tests which have in the doc comment the groups 'foo' AND 'bar' but not 'baz' then you can do it like this:\n\n```php \n$filter = new GroupFilter();\n$filter\n    -\u003egroupIncluded('foo')\n    -\u003egroupIncluded('bar')\n    -\u003egroupExcluded('baz');\n\n$this-\u003etaskSplitTestsByGroups(5)\n   -\u003etestsFrom('tests')\n   -\u003egroupsTo('tests/_data/paratest_')\n   -\u003eaddFilter($filter)\n   -\u003erun();\n```\n\nNow create your own filter class:\n```php \n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace ...;\n\nuse Codeception\\Task\\Filter\\DefaultFilter;\n\nclass CustomFilter extends DefaultFilter {\n\n}\n```\n\nThe TestFileSplitterTask.php pushes an array of SplFileInfo Objects to the filter.  \nThe TestsSplitterTask.php pushes an array of SelfDescribing Objects to the filter.\n\n## Configuration\n\nLoad Codeception config file to specify the path to Codeception before split* tasks:\n\n```php\n\\Codeception\\Configuration::config('tests/codeception.yml');\n```\n\n## Contributing\n\nThank you for contributing to codeception/robo-paracept!\n\n1. Fork this project\n2. install all deps\n3. create a branch from master\n4. make your changes\n5. extend or create tests for your changes\n6. run `composer test` (This will execute lint, codestyle and unit tests sequential)\n7. open a Merge Request\n\n### Coding Standard\n\nPlease note that this project follows the PSR-12 Coding Standard. You can check your coding style with:\n\n```shell\ncomposer codestyle\n```\n\n### Unit Tests\n\nAll changes which you will done must pass the unit tests. If you change some logic or you add some new methods please be fair and write a test.\n\n```shell\ncomposer unit\n```\n\n### License MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeception%2Frobo-paracept","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeception%2Frobo-paracept","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeception%2Frobo-paracept/lists"}