-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor how tests are run #10
Comments
I'm very excited to see this! We've had to increase our memory limit every so often to deal with test cases sticking around to the end. One thing you might not have considered yet is that by default any exceptions thrown during a test will have a reference to the test case itself in the backtrace. As I've started working on a new Java project at my job I'm picking up the new JUnit features. One neat feature is the ability to add a TestDecorator to any test case using an annotation. This is how jMock checks its mocks at the end of each method, and a similar docblock annotation could be helpful for PHP tool integrators. |
Sebastian, this looks like a good move. It also looks like it will resolve the issues I reported in #261. Can you confirm that the behaviour I mention there is not intentional and won't be somehow preserved by your refactor? |
I just did a quick hack where I have a single TestResult and I use it to execute on a loop of TestSuite-s which each correspond to a single file, so that I can deallocate the suite after each test file is executed. I saw in my test suite a reduction from 643MB to 431MB. So very excited to see this implemented better. |
Hello @sebastianbergmann could you please add more details to this issue?
Basically I think that new 4.0 branch is a good moment to solve old problems and implement existing functionality in cleaner way and I hope I'll be able to help in coding it. |
Before I report this as a bug, as it seems to be a design issue. Running tests with |
What is the status of this? |
wouldn't it make sense to also delay the creation of DataProviderTestSuites when doing this? They'd still need to collect all the data beforehand with the proposed changes, keeping them rather large. This would obviously need the data providers to either be run twice(i.e. one for counting, one later for the data) or allow for changes to the testcase maximum count once the provider is being processed. |
Data providers should be run once. If that means that counting no longer works and we need to change how progress is displayed, so be it. |
data providers can provide also a label for cases, which one can use as a value for tests filter he want to run, |
Superseded by #3213. |
TestResult
TestResult
just as a Collecting Parameter to collect test resultsTestSuiteIterator
to get all tests that are to be run from the top-levelTestSuite
FilterIterator
implementations to filter tests based on--filter
,--group
, and--exclude-group
, for instance@depends
annotationsTestCase
objects and clean them up immediately after a test has been runThe text was updated successfully, but these errors were encountered: