Git Product home page Git Product logo

Comments (6)

liuggio avatar liuggio commented on July 19, 2024

This could be an idea for the next version, having a deep phpunit integration,
but fastest now execute in processes in parallel.
In my team db fixtures are the slow part of the test, could you give an example how you use it?

from fastest.

Ocramius avatar Ocramius commented on July 19, 2024

I'll take a direct reference to a test here: https://github.com/Ocramius/ProxyManager/blob/ff246e7569744e4a15dc2b043777230d82813d2f/tests/ProxyManagerTest/Functional/FatalPreventionFunctionalTest.php#L89

This test takes all defined classes and throws them at a separate test (much like .phpt test cases) so that if fatals occur, the test suite doesn't crash.

In order to do that, a new process has to be spawned, and that takes an incredible amount of time for engines that are slower at booting up (hhvm, for example).

from fastest.

liuggio avatar liuggio commented on July 19, 2024

Ehm this is an edge case - but -
if you use fastest and you create a singular functional test fore ach classes https://github.com/Ocramius/ProxyManager/blob/ff246e7569744e4a15dc2b043777230d82813d2f/tests/ProxyManagerTest/Functional/FatalPreventionFunctionalTest.php#L124

if a generator fails will broke only the process where that test run

from fastest.

Ocramius avatar Ocramius commented on July 19, 2024

@liuggio that still forces me to write code where the same test case applies multiple times.

For instance, a parallelized test may be reading data from various .csv files, or trying different DB connections (connection name provided by the data-provider). I don't really want to code additional classes for something that is indeed a test parameter.

I see that it's indeed problematic to implement support for something like that, but it would really be awesome :-)

from fastest.

liuggio avatar liuggio commented on July 19, 2024

That's the adding value of fastest,
for each test fastest provides env parameters like echo getevn('ENV_TEST_CHANNEL');
that contains a different value per processor :)
or echo getevn('ENV_TEST_INC_NUMBER') that is the incremental id of the test.

from fastest.

liuggio avatar liuggio commented on July 19, 2024

But yes I think there's no clean way to do this...

from fastest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.