robo-paracept icon indicating copy to clipboard operation
robo-paracept copied to clipboard

Codeception tests ran with Robo Parallel has errors 0 and timeout 0.000000 in single test but in main raport all tests has errors

Open michalper opened this issue 4 years ago • 0 comments

What are you trying to achieve?

I trying to run acceptance tests on TeamCity using Robo Parallel.

What do you get instead?

Every test has assertions="0" time="0.000000" in XML report, but in main report there is information:

<testsuite name="acceptance" tests="12" assertions="0" errors="12" failures="0" skipped="0" time="0.000000">

Provide console output if related. Use -vvv mode for more details.

  Starting: /usr/bin/php vendor/bin/robo -vvv parallel:run
07:00:34
  in directory: /opt/teamcity/buildAgent/work/28e4ceac98318065
07:00:34
   [ParallelExec] /opt/teamcity/buildAgent/work/28e4ceac98318065/vendor/bin/codecept run acceptance --group paracept_1 --debug -c /opt/teamcity/buildAgent/work/28e4ceac98318065/codeception.yml --xml /opt/teamcity/buildAgent/work/28e4ceac98318065/tests/_output/result_1.xml
07:00:34
   [ParallelExec] /opt/teamcity/buildAgent/work/28e4ceac98318065/vendor/bin/codecept run acceptance --group paracept_2 --debug -c /opt/teamcity/buildAgent/work/28e4ceac98318065/codeception.yml --xml /opt/teamcity/buildAgent/work/28e4ceac98318065/tests/_output/result_2.xml
07:00:34
   [ParallelExec] /opt/teamcity/buildAgent/work/28e4ceac98318065/vendor/bin/codecept run acceptance --group paracept_3 --debug -c /opt/teamcity/buildAgent/work/28e4ceac98318065/codeception.yml --xml /opt/teamcity/buildAgent/work/28e4ceac98318065/tests/_output/result_3.xml
07:00:34
   [ParallelExec] /opt/teamcity/buildAgent/work/28e4ceac98318065/vendor/bin/codecept run acceptance --group paracept_4 --debug -c /opt/teamcity/buildAgent/work/28e4ceac98318065/codeception.yml --xml /opt/teamcity/buildAgent/work/28e4ceac98318065/tests/_output/result_4.xml
07:00:34
   [ParallelExec] /opt/teamcity/buildAgent/work/28e4ceac98318065/vendor/bin/codecept run acceptance --group paracept_5 --debug -c /opt/teamcity/buildAgent/work/28e4ceac98318065/codeception.yml --xml /opt/teamcity/buildAgent/work/28e4ceac98318065/tests/_output/result_5.xml
07:00:43
   [ParallelExec]  '/opt/teamcity/buildAgent/work/28e4ceac98318065/vendor/bin/codecept run acceptance --group paracept_1 --debug -c /opt/teamcity/buildAgent/work/28e4ceac98318065/codeception.yml --xml /opt/teamcity/buildAgent/work/28e4ceac98318065/tests/_output/result_1.xml' exited with code 255 
07:00:43
  '/opt/teamcity/buildAgent/work/28e4ceac98318065/vendor/bin/codecept run acceptance --group paracept_2 --debug -c /opt/teamcity/buildAgent/work/28e4ceac98318065/codeception.yml --xml /opt/teamcity/buildAgent/work/28e4ceac98318065/tests/_output/result_2.xml' exited with code 1 
07:00:43
  '/opt/teamcity/buildAgent/work/28e4ceac98318065/vendor/bin/codecept run acceptance --group paracept_3 --debug -c /opt/teamcity/buildAgent/work/28e4ceac98318065/codeception.yml --xml /opt/teamcity/buildAgent/work/28e4ceac98318065/tests/_output/result_3.xml' exited with code 1 
07:00:43
  '/opt/teamcity/buildAgent/work/28e4ceac98318065/vendor/bin/codecept run acceptance --group paracept_4 --debug -c /opt/teamcity/buildAgent/work/28e4ceac98318065/codeception.yml --xml /opt/teamcity/buildAgent/work/28e4ceac98318065/tests/_output/result_4.xml' exited with code 1 
07:00:43
  '/opt/teamcity/buildAgent/work/28e4ceac98318065/vendor/bin/codecept run acceptance --group paracept_5 --debug -c /opt/teamcity/buildAgent/work/28e4ceac98318065/codeception.yml --xml /opt/teamcity/buildAgent/work/28e4ceac98318065/tests/_output/result_5.xml' exited with code 1 
07:00:43
    Time 8.171s
07:00:43
   [ParallelExec]  Exit code 255  Time 8.171s
07:00:43
  Process exited with code 255
07:00:43
  Process exited with code 255 (Step: Acceptance tests run parallel (Command Line))
<testsuites>
<testsuite name="acceptance" tests="12" assertions="0" errors="12" failures="0" skipped="0" time="0.000000">
<testcase file="/opt/teamcity/buildAgent/work/28e4ceac98318065/tests/acceptance/ClientsWebsites/ClientsWebsitesCreateCest.php" name="createClientWebsite" class="Tests\Acceptance\ClientsWebsites\ClientsWebsitesCreateCest" feature="create client website" assertions="0" time="0.000000"/>
<testcase file="/opt/teamcity/buildAgent/work/28e4ceac98318065/tests/acceptance/ClientsWebsites/ClientsWebsitesDeleteCest.php" name="deleteClientWebsite" class="Tests\Acceptance\Clients\ClientsWebsitesDeleteCest" feature="delete client website" assertions="0" time="0.000000"/>
<testcase file="/opt/teamcity/buildAgent/work/28e4ceac98318065/tests/acceptance/ClientsWebsites/ClientsWebsitesSearchCest.php" name="searchUsingClientId" class="Tests\Acceptance\ClientsWebsites\ClientsWebsitesSearchCest" feature="Search using client_id select" assertions="0" time="0.000000"/>
<testcase file="/opt/teamcity/buildAgent/work/28e4ceac98318065/tests/acceptance/ClientsWebsites/ClientsWebsitesSearchCest.php" name="searchUsingProductId" class="Tests\Acceptance\ClientsWebsites\ClientsWebsitesSearchCest" feature="Search using product_id select" assertions="0" time="0.000000"/>
<testcase file="/opt/teamcity/buildAgent/work/28e4ceac98318065/tests/acceptance/ClientsWebsites/ClientsWebsitesSearchCest.php" name="searchUsingWebsiteUrl" class="Tests\Acceptance\ClientsWebsites\ClientsWebsitesSearchCest" feature="Search using website_url input" assertions="0" time="0.000000"/>
<testcase file="/opt/teamcity/buildAgent/work/28e4ceac98318065/tests/acceptance/ClientsWebsites/ClientsWebsitesSearchCest.php" name="searchUsingExpirationDate" class="Tests\Acceptance\ClientsWebsites\ClientsWebsitesSearchCest" feature="Search using website_url input" assertions="0" time="0.000000"/>
<testcase file="/opt/teamcity/buildAgent/work/28e4ceac98318065/tests/acceptance/Countries/CountriesCreateCest.php" name="createLanguage" class="Tests\Acceptance\Countries\CountriesCreateCest" feature="create language" assertions="0" time="0.000000"/>
<testcase file="/opt/teamcity/buildAgent/work/28e4ceac98318065/tests/acceptance/Countries/CountriesDeleteCest.php" name="deleteCountry" class="Tests\Acceptance\Countries\CountriesDeleteCest" feature="delete country" assertions="0" time="0.000000"/>
<testcase file="/opt/teamcity/buildAgent/work/28e4ceac98318065/tests/acceptance/Countries/CountriesEditCest.php" name="editCountry" class="Tests\Acceptance\Countries\CountriesEditCest" feature="edit country" assertions="0" time="0.000000"/>
<testcase file="/opt/teamcity/buildAgent/work/28e4ceac98318065/tests/acceptance/Countries/CountriesSearchCest.php" name="seeLanguages" class="Tests\Acceptance\Countries\CountriesSearchCest" feature="See list of countries" assertions="0" time="0.000000"/>
<testcase file="/opt/teamcity/buildAgent/work/28e4ceac98318065/tests/acceptance/Countries/CountriesSearchCest.php" name="searchUsingName" class="Tests\Acceptance\Countries\CountriesSearchCest" feature="Search using name input" assertions="0" time="0.000000"/>
<testcase file="/opt/teamcity/buildAgent/work/28e4ceac98318065/tests/acceptance/Countries/CountriesSearchCest.php" name="searchUsingContinent" class="Tests\Acceptance\Countries\CountriesSearchCest" feature="Search using continent_id select" assertions="0" time="0.000000"/>
</testsuite>
</testsuites>

Provide test source code if related

<?php

require_once 'vendor/autoload.php';

use Codeception\Task\MergeReports;
use Codeception\Task\SplitTestsByGroups;
use Robo\Result;
use Robo\Tasks;

class RoboFile extends Tasks
{
    use MergeReports;
    use SplitTestsByGroups;

    public function parallelSplitTests(): void
    {
        $this->taskSplitTestFilesByGroups(5)
            ->projectRoot('.')
            ->testsFrom('tests/acceptance')
            ->groupsTo('tests/_data/paracept_')
            ->run();
    }

    public function parallelRun(): Result
    {
        $parallel = $this->taskParallelExec();
        for ($i = 1; $i <= 5; $i++) {
            $parallel->process(
                $this->taskCodecept()
                    ->suite('acceptance')
                    ->group("paracept_$i")
                    ->debug()
                    ->configFile(__DIR__ . '/codeception.yml')
                    ->xml(__DIR__ . "/tests/_output/result_$i.xml")
            );
        }

        return $parallel->run();
    }

    public function parallelMergeResults(): void
    {
        $merge = $this->taskMergeXmlReports();
        for ($i = 1; $i <= 5; $i++) {
            $merge->from(__DIR__ . "/tests/_output/result_$i.xml");
        }
        $merge->into(__DIR__ . '/tests/_output/result_paracept.xml')->run();
    }

    public function parallelRunAndMergeResults(): Result
    {
        $result = $this->parallelRun();
        $this->parallelMergeResults();

        return $result;
    }
}

Details

  • Codeception version: ^4.1
  • PHP Version: 7.4
  • Operating System: Linux
  • Installation type: Composer
  • List of installed packages (composer show)
aws/aws-sdk-php                     3.134.3            AWS SDK for PHP - Use Amazon Web Services in your PHP project
barryvdh/laravel-ide-helper         v2.6.7             Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.
barryvdh/reflection-docblock        v2.0.6            
beberlei/assert                     v3.2.7             Thin assertion library for input validation in business models.
behat/gherkin                       v4.6.2             Gherkin DSL parser for PHP 5.3
brianium/habitat                    v1.0.0             A dependable php environment
brianium/paratest                   4.0.0              Parallel testing for PHP
clue/stream-filter                  v1.4.1             A simple and modern approach to stream filtering in PHP
codeception/codeception             4.1.4              BDD-style testing framework
codeception/lib-asserts             1.11.0             Assertion methods used by Codeception core and Asserts module
codeception/lib-innerbrowser        1.3.1              Parent library for all Codeception framework modules and PhpBrowser
codeception/module-db               1.0.1              WebDriver module for Codeception
codeception/module-laravel5         1.1.0              Codeception module for Laravel 5 framework
codeception/module-webdriver        1.0.7              WebDriver module for Codeception
codeception/phpunit-wrapper         9.0.1              PHPUnit classes used by Codeception
codeception/robo-paracept           0.4.2              Codeception Parallel Execution Tasks via Robo Task Runner
codeception/stub                    3.6.1              Flexible Stub wrapper for PHPUnit's Mock Builder
composer/ca-bundle                  1.2.6              Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.
composer/composer                   1.10.1             Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.
composer/semver                     1.5.1              Semver library that offers utilities, version constraint parsing and validation.
composer/spdx-licenses              1.5.3              SPDX licenses list and validation library.
composer/xdebug-handler             1.4.1              Restarts a process without Xdebug.
consolidation/annotated-command     4.1.0              Initialize Symfony Console commands from annotated command class methods.
consolidation/config                1.2.1              Provide configuration services for a commandline tool.
consolidation/log                   2.0.0              Improved Psr-3 / Psr\Log logger based on Symfony Console components.
consolidation/output-formatters     4.1.0              Format text by applying transformations provided by plug-in formatters.
consolidation/robo                  1.4.12             Modern task runner
consolidation/self-update           1.1.5              Provides a self:update command for Symfony Console applications.
container-interop/container-interop 1.2.0              Promoting the interoperability of container objects (DIC, SL, etc.)
davejamesmiller/laravel-breadcrumbs 5.3.2              A simple Laravel-style way to create breadcrumbs.
dflydev/dot-access-data             v1.1.0             Given a deep data structure, access data by dot notation.
doctrine/cache                      1.10.0             PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and ...
doctrine/dbal                       v2.10.1            Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.
doctrine/event-manager              1.1.0              The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.
doctrine/inflector                  1.3.1              Common String Manipulations with regard to casing and singular/plural rules.
doctrine/instantiator               1.3.0              A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                      1.2.0              PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
dragonmantank/cron-expression       v2.3.0             CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due
egulias/email-validator             2.1.17             A library for validating emails against several RFCs
facade/ignition-contracts           1.0.0              Solution contracts for Ignition
filp/whoops                         2.7.1              php error handling for cool kids
fzaninotto/faker                    v1.9.1             Faker is a PHP library that generates fake data for you.
grasmash/expander                   1.0.0              Expands internal property references in PHP arrays file.
grasmash/yaml-expander              1.4.0              Expands internal property references in a yaml file.
guzzlehttp/guzzle                   6.5.2              Guzzle is a PHP HTTP client library
guzzlehttp/promises                 v1.3.1             Guzzle promises library
guzzlehttp/psr7                     1.6.1              PSR-7 message implementation that also provides common utility methods
hamcrest/hamcrest-php               v2.0.0             This is the PHP port of Hamcrest Matchers
http-interop/http-factory-guzzle    1.0.0              An HTTP Factory using Guzzle PSR7
jean85/pretty-package-versions      1.2                A wrapper for ocramius/package-versions to get pretty versions strings
justinrainbow/json-schema           5.2.9              A library to validate a json schema.
laravel/framework                   v6.18.3            The Laravel Framework.
laravelcollective/html              v6.1.0             HTML and Form Builders for the Laravel Framework
league/commonmark                   1.3.3              Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)
league/container                    2.4.1              A fast and intuitive dependency injection container.
league/flysystem                    1.0.66             Filesystem abstraction: Many filesystems, one API.
mockery/mockery                     1.3.1              Mockery is a simple yet flexible PHP mock object framework
monolog/monolog                     2.0.2              Sends your logs to files, sockets, inboxes, databases and various web services
mtdowling/jmespath.php              2.5.0              Declaratively specify how to extract elements from a JSON document
myclabs/deep-copy                   1.9.5              Create deep copies (clones) of your objects
nesbot/carbon                       2.32.2             An API extension for DateTime that supports 281 different languages.
ocramius/package-versions           1.7.0              Composer plugin that provides efficient querying for installed package versions (no runtime IO)
opis/closure                        3.5.1              A library that can be used to serialize closures (anonymous functions) and arbitrary objects.
paragonie/random_compat             v9.99.99           PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
phar-io/manifest                    1.0.3              Component for reading phar.io manifest information from a PHP Archive (PHAR)
phar-io/version                     2.0.1              Library for handling version information and constraints
php-http/client-common              2.1.0              Common HTTP Client implementations and tools for HTTPlug
php-http/discovery                  1.7.4              Finds installed HTTPlug implementations and PSR-7 message factories
php-http/guzzle6-adapter            v2.0.1             Guzzle 6 HTTP Adapter
php-http/httplug                    2.1.0              HTTPlug, the HTTP client abstraction for PHP
php-http/message                    1.8.0              HTTP Message related tools
php-http/message-factory            v1.0.2             Factory interfaces for PSR-7 HTTP Message
php-http/promise                    v1.0.0             Promise used for asynchronous HTTP requests
php-webdriver/webdriver             1.8.2              A PHP client for Selenium WebDriver. Previously facebook/webdriver.
phpdocumentor/reflection-common     2.0.0              Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock   5.1.0              With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a Doc...
phpdocumentor/type-resolver         1.1.0              A PSR-5 based resolver of Class names, Types and Structural Element Names
phpoption/phpoption                 1.7.3              Option Type for PHP
phpspec/prophecy                    v1.10.3            Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage           8.0.1              Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator           3.0.0              FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-invoker                 3.0.0              Invoke callables with a timeout
phpunit/php-text-template           2.0.0              Simple template engine.
phpunit/php-timer                   3.0.0              Utility class for timing
phpunit/php-token-stream            4.0.0              Wrapper around PHP's tokenizer extension.
phpunit/phpunit                     9.1.1              The PHP Unit Testing framework.
predis/predis                       v1.1.1             Flexible and feature-complete Redis client for PHP and HHVM
psr/container                       1.0.0              Common Container Interface (PHP FIG PSR-11)
psr/http-client                     1.0.0              Common interface for HTTP clients
psr/http-factory                    1.0.1              Common interfaces for PSR-7 HTTP message factories
psr/http-message                    1.0.1              Common interface for HTTP messages
psr/log                             1.1.3              Common interface for logging libraries
psr/simple-cache                    1.0.1              Common interfaces for simple caching
ralouphie/getallheaders             3.0.3              A polyfill for getallheaders.
ramsey/uuid                         3.9.3              Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).
roave/security-advisories           dev-master 0f73cf4 Prevents installation of composer packages with known security vulnerabilities: no API, simply require it
sebastian/code-unit                 1.0.0              Collection of value objects that represent the PHP code units
sebastian/code-unit-reverse-lookup  2.0.0              Looks up which function or method a line of code belongs to
sebastian/comparator                4.0.0              Provides the functionality to compare PHP values for equality
sebastian/diff                      4.0.0              Diff implementation
sebastian/environment               5.0.2              Provides functionality to handle HHVM/PHP environments
sebastian/exporter                  4.0.0              Provides the functionality to export PHP variables for visualization
sebastian/global-state              4.0.0              Snapshotting of global state
sebastian/object-enumerator         4.0.0              Traverses array structures and object graphs to enumerate all referenced objects
sebastian/object-reflector          2.0.0              Allows reflection of object attributes, including inherited and non-public ones
sebastian/recursion-context         4.0.0              Provides functionality to recursively process PHP variables
sebastian/resource-operations       3.0.0              Provides a list of PHP built-in functions that operate on resources
sebastian/type                      2.0.0              Collection of value objects that represent the types of the PHP type system
sebastian/version                   3.0.0              Library that helps with managing the version number of Git-hosted PHP projects
seld/jsonlint                       1.7.2              JSON Linter
seld/phar-utils                     1.1.0              PHAR file format utilities, for when PHP phars you up
sentry/sdk                          2.1.0              This is a metapackage shipping sentry/sentry with a recommended http client.
sentry/sentry                       2.3.2              A PHP SDK for Sentry (http://sentry.io)
sentry/sentry-laravel               1.7.1              Laravel SDK for Sentry (https://sentry.io)
swiftmailer/swiftmailer             v6.2.3             Swiftmailer, free feature-rich PHP mailer
symfony/browser-kit                 v5.0.7             Symfony BrowserKit Component
symfony/console                     v4.4.7             Symfony Console Component
symfony/css-selector                v5.0.7             Symfony CssSelector Component
symfony/debug                       v4.4.7             Symfony Debug Component
symfony/dom-crawler                 v5.0.7             Symfony DomCrawler Component
symfony/error-handler               v4.4.7             Symfony ErrorHandler Component
symfony/event-dispatcher            v4.4.7             Symfony EventDispatcher Component
symfony/event-dispatcher-contracts  v1.1.7             Generic abstractions related to dispatching event
symfony/filesystem                  v4.4.7             Symfony Filesystem Component
symfony/finder                      v4.4.7             Symfony Finder Component
symfony/http-foundation             v4.4.7             Symfony HttpFoundation Component
symfony/http-kernel                 v4.4.7             Symfony HttpKernel Component
symfony/mime                        v5.0.7             A library to manipulate MIME messages
symfony/options-resolver            v5.0.7             Symfony OptionsResolver Component
symfony/polyfill-ctype              v1.15.0            Symfony polyfill for ctype functions
symfony/polyfill-iconv              v1.15.0            Symfony polyfill for the Iconv extension
symfony/polyfill-intl-idn           v1.15.0            Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-mbstring           v1.15.0            Symfony polyfill for the Mbstring extension
symfony/polyfill-php72              v1.15.0            Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/polyfill-php73              v1.15.0            Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/polyfill-uuid               v1.15.0            Symfony polyfill for uuid functions
symfony/process                     v4.4.7             Symfony Process Component
symfony/routing                     v4.4.7             Symfony Routing Component
symfony/service-contracts           v2.0.1             Generic abstractions related to writing services
symfony/translation                 v4.4.7             Symfony Translation Component
symfony/translation-contracts       v2.0.1             Generic abstractions related to translation
symfony/var-dumper                  v4.4.7             Symfony mechanism for exploring and dumping PHP variables
symfony/yaml                        v4.4.7             Symfony Yaml Component
theseer/tokenizer                   1.1.3              A small library for converting tokenized PHP source code into XML and potentially other formats
tijsverkoyen/css-to-inline-styles   2.2.2              CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when...
tomko/common2                       1.3.10             Common2
vlucas/phpdotenv                    v3.6.2             Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
webmozart/assert                    1.7.0              Assertions to validate method input/output with nice error messages.
  • Suite configuration:
paths:
  tests: tests
  output: tests/_output
  data: tests/_data
  support: tests/_support
  envs: tests/_envs
actor_suffix: Tester
extensions:
  enabled:
    - Codeception\Extension\RunFailed
groups:
  paracept_*: tests/_data/paracept_*


actor: AcceptanceTester
modules:
    enabled:
        - WebDriver:
           url: 'http://ci-office.statscore.com/'
           window_size: false
           log_js_errors: true
           port: 4444
           browser: chrome
           capabilities:
               chromeOptions:
                  args: ["--window-size=1600,900", "--headless"]
        - \Helper\Acceptance
        - Db
        - DbHelper
        - Laravel5:
            part: ORM
    config:
        Db:
          dsn: 'mysql:host=localhost;dbname=head'
          user: ''
          password: ''
          populate: false
          cleanup: false
extensions:
    enabled:
        - Codeception\Extension\RunProcess:
            0: exec docker run --net=host selenium/standalone-chrome
            sleep: 7 # wait 7 second for processes to boot

michalper avatar Apr 14 '20 12:04 michalper