WordPoints / dev-lib

Developer tools for WordPoints projects
MIT License
4 stars 0 forks source link

wpcept: Run tests with WordPoints newtork-active #189

Open JDGrimes opened 8 years ago

JDGrimes commented 8 years ago

Similar to #138, we should run the tests with WordPoints network active. I'm currently in the process of creating some tests for https://github.com/WordPoints/wordpoints/issues/562, and these will specifically be for the network modules screen. We currently don't support running the tests with WordPoints network-active though.

I'm not sure if we need to run all the tests over again with WordPoints network active, or if we should just run these tests separately.

JDGrimes commented 8 years ago

Our Codeception tests currently run to about 4 minutes. If we run both with WordPoints network-active and on multisite when not network active in addition, we'll be adding 10+ minutes to our build, and that will grow in the future. It would be nice if we could find a way to speed up these tests. Or perhaps we need to run them separately. But I think that ultimately we will want to run all of the tests under all of these conditions.

JDGrimes commented 8 years ago

For the moment though, I'd like to just be able to place the network tests into a certain directory and just run those tests with WordPress network active. We can just automatically run the network directory inside of acceptance, and these tests will be marked as skipped when we run all of the tests which will remind us that some of them have to be run separately.

JDGrimes commented 8 years ago

I was going to add this handling for modules as well, but then we'll need to check if the directory exists, and skip those tests if not.

But for the modules, should these tests require that the module itself be network-active, or just WordPoints? That is, should we set WORDPOINTS_MODULE_NETWORK_ACTIVE=1? I guess maybe for now we shouldn't implement this for modules. When we do though, this is a check that we can use to see if the directory exists:


    if [[ ! -e tests/codeception/acceptance/network ]]; then
        echo Not running network codecept tests.
        return;
    fi