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

How to print log on Webception #30

Open
huytd83 opened this issue Nov 18, 2014 · 1 comment
Open

How to print log on Webception #30

huytd83 opened this issue Nov 18, 2014 · 1 comment

Comments

@huytd83
Copy link

huytd83 commented Nov 18, 2014

Webception only shows 1 type of log file. It's not good idea why on console we can print with many type like html/xml/debug ... :( pls show to me how we can set it.

@elchesco
Copy link

there's a way around this, might not be optimal but I've done it in the past like this:
open webception/App/Lib/Codeception.php look for getCommandPath around line 333 and add options as you need. I always use the same options as I don't have a need to get them from a config file (might be a good thing to do/consider as there's already a config option in there), but for the sake of doing this try:

public function getCommandPath($type, $filename)
{
    // Build all the different parameters as part of the console command
    $params = array(
        $this->config['executable'],        // Codeception Executable
        "run",                              // Command to Codeception
        "--no-colors",                      // Forcing Codeception to not use colors, if enabled in codeception.yml
        "--verbose",                        // 
        "--debug",                          // 
        "--steps",                          // 
        "--html",                           // 
        "--json",                           // 
        "--xml",                            //
        "-n",                               //
        "--config=\"{$this->site->getConfig()}\"", // Full path & file of Codeception
        $type,                              // Test Type (Acceptance, Unit, Functional)
        $filename,                          // Filename of the Codeception test
        "2>&1"                              // Added to force output of running executable to be streamed out
    );

    // Build the command to be run.
    return implode(' ', $params);
}

@Patabugen Patabugen self-assigned this Nov 17, 2015
@Patabugen Patabugen removed their assignment Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants