Skip to content

Run a class in separate process. #2591

@ArturGoldyn

Description

@ArturGoldyn
Q A
PHPUnit version 4.0.2
PHP version 5.3.3
Installation Method PHAR

We can run individual tests in separate processes, but we cannot run a test class in a separate process.
It would be nice to have @runTestsClassInSeparateProcess, not only @runTestsInSeparateProcesses

The goal is to run setUpBeforeClass once (it takes a few seconds), then perform all tests in separate process, and then at the end lose all global variable changes that occured.
Unfortunately some of our objects collide and don't allow us to pass to the next test, but they work with --process-isolation parameter perfectly. Therefore we would like to have a @runTestsClassInSeparateProcess annotation to run just few classes in separate process, but use this one process for all tests in this class.

Metadata

Metadata

Labels

type/enhancementA new idea that should be implemented

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions