Skip to content
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

À tout de suite: fast self-test suite #3453

Closed
6 of 38 tasks
epdenouden opened this issue Dec 19, 2018 · 1 comment
Closed
6 of 38 tasks

À tout de suite: fast self-test suite #3453

epdenouden opened this issue Dec 19, 2018 · 1 comment
Assignees
Labels
feature/data-provider Data Providers feature/process-isolation Issues related to running tests in separate PHP processes feature/test-dependencies Issues related to explicitly declared dependencies between tests feature/test-runner CLI test runner type/tests Tests! Yes, PHPUnit, too, needs tests.

Comments

@epdenouden
Copy link
Contributor

epdenouden commented Dec 19, 2018

As a developer of PHPUnit
I want a fast integration test of all basic use cases
so that experimenting with the new logging is easier and more fun

Inspiration

Related to the redesign of the result event and logging system and the updates for test execution order logging and TestDox.

Working on the test execution ordering I wished I had a quick test suite collection of tests that shows me the general state of PHPUnit with a focus on the developer experience. The current test collection is too unwieldy to run on my old laptop continuously.

What functionality to test?

Implementation

  • create a small test suite with the basics as a part of the main test collection, but which can also be reused for individual end-to-end tests
  • reuse existing tests where possible
  • review existing end-to-end tests: remove duplicates, obsolete regression tests
  • make it easier to test loggers via unit tests

List of scenarios

Basics

  • all test result types with standard messages
  • all test result types with verbose messages

Fixtures

  • TestCase class with a failing setUpBeforeClass()
  • TestCase class with a failing tearDownAfterClass()
  • TestCase class with a setUp() that fails always
  • TestCase class with a tearDown() that fails

Dataproviders

  • Test with @dataprovider and a provider that returns a simple array
  • Test with @dataprovider and a provider that returns named rows
  • Test with an incompatible @dataprovider
  • Test with a @dataprovider that returns no data
  • Test with a Generator @dataprovider
  • Test with a Generator @dataprovider with a duplicate key
  • Test with a malformed @dataprovider row
  • skipped dataprovider; see DataProviderSkippedTest

Test execution order

  • Test that @depends on a previous test (original: no output)
  • Test that @depends on a 'later' test (original: skipped, when no-depends)
  • Test that @depends on a Test in another class
  • unbuffered logging: reordering affects both run order and output order
  • buffered logging: reordering affects only run order and result, but not output order
  • no difference between buffered and unbuffered logging when in original order
  • output random configuration to make random runs are reproducible, see Random order seed should be printed in non-verbose mode as well #3515

Test collection structure

  • TestSuite with only nested TestSuites
  • TestSuite with only TestCases
  • TestSuite with a mix of suites and tests
  • Test class without any tests
  • PHPT end-to-end
  • skipped PHPT end-to-end via a triggered --SKIPIF-- section
  • Test skipped by @requires

Isolation

  • Test class with @runClassInSeparateProcess, all events reach user
  • Test with @runInSeparateProcess, all events reach user

Included printers and logging formats

@epdenouden
Copy link
Contributor Author

@sebastianbergmann forgot to add, I am already working on this. You can assign the issue as a xmas present.

@epdenouden epdenouden changed the title À tout de suite [RFC] À tout de suite: fast self-test suite Dec 29, 2018
@stale stale bot added stale and removed stale labels May 15, 2019
Repository owner deleted a comment from stale bot Jul 2, 2019
Repository owner deleted a comment from epdenouden Jul 2, 2019
@sebastianbergmann sebastianbergmann added feature/data-provider Data Providers feature/process-isolation Issues related to running tests in separate PHP processes feature/test-dependencies Issues related to explicitly declared dependencies between tests feature/test-runner CLI test runner type/tests Tests! Yes, PHPUnit, too, needs tests. and removed in progress labels Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/data-provider Data Providers feature/process-isolation Issues related to running tests in separate PHP processes feature/test-dependencies Issues related to explicitly declared dependencies between tests feature/test-runner CLI test runner type/tests Tests! Yes, PHPUnit, too, needs tests.
Projects
None yet
Development

No branches or pull requests

2 participants