CLI Tool

What's a test framework if you can't run it? Bundled with the framework is a Symfony Console application for running your test suites.

The CLI tool is still in initial development and much of this is subject to change.

Configured Test Runs

The recommended way to run your test suites is to have a configuration defined that explains how everything should be executed. At the moment this is a manual process, though we expect as the configuration becomes more complex the tool will assit in generating the appropriate configuration. For now, you should create a file in your project's root directory named async-unit.json. It should have the following contents...

{
    "testDirs": ["tests"]
}

Feel free to include as many directories as required that you want the framework to scan for your tests. Once this is done you can simply execute the default command.

vendor/bin/asyncunit 

Unconfigured Test Runs

If you're super eager to get started and don't even want to create the configuration file you can currently run tests by executing the run command.

vendor/bin/asyncunit run tests

This command is, currently, the same as running a configured tests. However, as the functionality of the framework increases this is highly likely to change and it will probably not be possible to run tests without a configuration. For now, you can take advantage of this functionality while it exists.

Last updated