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

Override function does not override as expected #3740

Closed
InputOutput opened this issue Nov 15, 2016 · 3 comments
Closed

Override function does not override as expected #3740

InputOutput opened this issue Nov 15, 2016 · 3 comments
Assignees

Comments

@InputOutput
Copy link

InputOutput commented Nov 15, 2016

What are you trying to achieve?

I'm trying to set the url config value for AngularJS from commandline using the --override option

What do you get instead?

The default url from acceptance.suite.yml

Provide console output if related. Use -vvv mode for more details.
I've added a dump on the AcceptanceTester object to discover where the override actually ends.

./codecept run -vvv acceptance Cms/CmsWidgetsACept -o "modules: enabled: AngularJS: url: localhost.net"

Provide test source code if related

(
    [class_name] => AcceptanceTester
    [modules] => Array
        (
            [enabled] => Array
                (
                    [0] => Array
                        (
                            [Db] => Array
                                (
                                    [dsn] => ****
                                    [user] => ****
                                    [password] => ****
                                    [populate] => 
                                    [cleanup] => 
                                    [reconnect] => 1
                                )

                        )

                    [1] => Array
                        (
                            [AngularJS] => Array
                                (
                                    [el] => html
                                    [browser] => chrome
                                    [restart] => 1
                                    [wait] => 1
                                    [url] => https://k2gocake.dev
                                    [script_timeout] => 20
                                    [window_size] => 1920x1080
                                    [capabilities] => Array
                                        (
                                            [chromeOptions] => Array
                                                (
                                                    [mobileEmulation] => Array
                                                        (
                                                            [deviceMetrics] => Array
                                                                (
                                                                    [width] => 1920
                                                                    [height] => 1080
                                                                    [pixelRatio] => 3
                                                                )

                                                            [userAgent] => Mozilla/5.0 (iPad; CPU OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1 AcceptTest
                                                        )

                                                )

                                        )

                                )

                        )

                    [2] => Array
                        (
                            [Asserts] => 
                        )

                    [3] => Array
                        (
                            [REST] => Array
                                (
                                    [depends] => PhpBrowser
                                    [url] => https://k2gocake.dev
                                )

                        )

                )

            [AngularJS] => 
            [url] => localhost.net
            [config] => Array
                (
                )

            [depends] => Array
                (
                )

        )

    [env] => Array
        (
            [firefox] => Array
                (
                    [modules] => Array
                        (
                            [config] => Array
                                (
                                    [AngularJS] => Array
                                        (
                                            [browser] => firefox
                                            [capabilities] => Array
                                                (
                                                    [unexpectedAlertBehaviour] => accept
                                                    [chromeOptions] => 
                                                )

                                        )

                                )

                        )

                )

            [browserstack] => Array
                (
                    [modules] => Array
                        (
                            [config] => Array
                                (
                                    [AngularJS] => Array
                                        (
                                            [browser] => edge
                                            [url] => https://testing.kaartje2go.nl
                                            [host] => ****
                                            [capabilities] => Array
                                                (
                                                    [os] => Windows
                                                    [os_version] => 10
                                                    [chromeoptions] => 
                                                )

                                        )

                                )

                        )

                )

            [testrunner] => Array
                (
                    [modules] => Array
                        (
                            [config] => Array
                                (
                                    [Db] => Array
                                        (
                                            [dsn] => ****
                                            [user] => ****
                                            [password] => ****
                                        )

                                    [AngularJS] => Array
                                        (
                                            [url] => https://testing.kaartje2go.nl
                                        )

                                    [REST] => Array
                                        (
                                            [url] => https://testing.kaartje2go.nl
                                        )

                                )

                        )

                )

        )

    [bootstrap] => _bootstrap.php
    [colors] => 1
    [memory_limit] => 1024M
    [strict_xml] => 
    [lint] => 1
    [backup_globals] => 1
    [coverage] => Array
        (
        )

    [namespace] => 
    [groups] => Array
        (
            [failed] => tests/_output/failed
        )

    [gherkin] => Array
        (
        )

    [path] => /home/vagrant/kaartje2go.nl/app/Test/Codeception/tests/acceptance/
    [shuffle] => 
    [error_level] => E_ALL & ~E_STRICT & ~E_DEPRECATED
)

Details

  • Codeception version: 2.2.6
  • PHP Version: 7.0.1
  • Operating System: Ubuntu 14.04
  • Installation type: Composer
  • List of installed packages (composer show)
    abraham/twitteroauth 0.5.3 The most popular PHP library for use with the Twitter OAuth REST API.
    amiddio/postnl master a98ec79
    aws/aws-sdk-php 2.8.31 AWS SDK for PHP - Use Amazon Web Services in your PHP project
    behat/gherkin v4.4.5 Gherkin DSL parser for PHP 5.3
    cakephp/cakephp-codesniffer 0.1.29 CakePHP CodeSniffer Standards
    cakephp/chronos 1.0.0 A simple API extension for DateTime.
    cakephp/collection 3.3.5 Work easily with arrays and iterators by having a battery of utility traversal methods
    cakephp/utility 3.3.8 CakePHP Utility classes such as Inflector, String, Hash, and Security
    cakephp/validation 3.3.8 CakePHP Validation library
    codeception/codeception 2.2.6 BDD-style testing framework
    composer/installers v1.2.0 A multi-framework Composer library installer
    congressus/sepa-direct-debit dev-master 72d2d63 Package to create SEPA Direct Debit XML (B2C, Business to Consumer only) files conform pain.008.001.02 or pain.008.001.03.
    container-interop/container-interop 1.1.0 Promoting the interoperability of container objects (DIC, SL, etc.)
    danielstjules/stringy 1.9.0 A string manipulation library with multibyte support
    doctrine/inflector v1.0.1 Common String Manipulations with regard to casing and singular/plural rules.
    doctrine/instantiator 1.0.5 A small, lightweight utility to instantiate objects in PHP without invoking their constructors
    eluceo/ical 0.7.0 The eluceo/iCal package offers a abstraction layer for creating iCalendars. You can easily create iCal files by using PHP object instead of ...
    facebook/graph-sdk 5.4.0 Facebook SDK for PHP
    facebook/webdriver 1.2.0 A PHP client for WebDriver
    flow/jsonpath 0.3.4 JSONPath implementation for parsing, searching and flattening arrays
    globalcitizen/php-iban v2.5.9 php-iban is a library for parsing and validating IBAN (and IIBAN) bank account information.
    graphaware/neo4j-bolt 1.7.1 Neo4j Bolt Binary Protocol PHP Driver
    graphaware/neo4j-common 3.2.1 Common Utilities library for Neo4j
    graphaware/neo4j-php-client 4.6.2 Neo4j-PHP-Client is the most advanced PHP Client for Neo4j
    graphaware/reco4php 2.0.2 Neo4j based Recommendation Engine Framework for PHP
    graylog2/gelf-php 1.5.0 A php implementation to send log-messages to a GELF compatible backend like Graylog2.
    guzzle/guzzle v3.9.3 PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle
    guzzlehttp/guzzle 6.2.2 Guzzle is a PHP HTTP client library
    guzzlehttp/promises 1.2.0 Guzzle promises library
    guzzlehttp/psr7 1.3.1 PSR-7 message implementation
    guzzlehttp/streams 1.5.1 Provides a simple abstraction over streams of data (Guzzle 4+)
    h4cc/wkhtmltopdf-amd64 0.12.2.1 Convert html to pdf using webkit (qtwebkit). Static linked linux binary for amd64 systems.
    hamcrest/hamcrest-php v1.2.2 This is the PHP port of Hamcrest Matchers
    hybridauth/hybridauth dev-master c7fa331 Open source social sign on PHP library.
    iio/libmergepdf 3.0.0 Library for merging multiple PDFs
    illuminate/container v5.0.33 The Illuminate Container package.
    illuminate/contracts v5.0.33 The Illuminate Contracts package.
    illuminate/support v5.0.33 The Illuminate Support package.
    ins0/google-measurement-php-client v2.1.1 Server-Side PHP Client to communicate to Google Analytics over the Google Measurement Protocol
    jeremeamia/SuperClosure 2.2.0 Serialize Closure objects, including their context and binding
    knplabs/knp-snappy dev-master 4e55d12 PHP5 library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage.
    league/fractal 0.13.0 Handle the output of complex data structures ready for API output.
    mobiledetect/mobiledetectlib 2.8.22 Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to ...
    mockery/mockery 0.9.4 Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its...
    monolog/monolog 1.21.0 Sends your logs to files, sockets, inboxes, databases and various web services
    myclabs/deep-copy 1.5.4 Create deep copies (clones) of your objects
    myclabs/php-enum 1.5.0 PHP Enum implementation
    natxet/CssMin 3.0.3 Minifying CSS
    neitanod/forceutf8 v2.0 PHP Class Encoding featuring popular Encoding::toUTF8() function --formerly known as forceUTF8()-- that fixes mixed encoded strings.
    nesbot/carbon 1.21.0 A simple API extension for DateTime.
    neutron/sphinxsearch-api 2.0.8 SphinxSearch PHP API
    nikic/php-parser v2.1.1 A PHP parser written in PHP
    packagist/yuicompressor-bin v2.4.8 YUI Compressor packaged for composer. JavaScript and CSS minification.
    paragonie/constant_time_encoding v2.0.3 Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)
    paragonie/random_compat v2.0.2 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
    pdepend/pdepend 2.2.4 Official version of pdepend to be handled with Composer
    phpdocumentor/reflection-common 1.0 Common reflection classes used by phpdocumentor to reflect the code structure
    phpdocumentor/reflection-docblock 3.1.1 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 0.2
    phpmd/phpmd 2.4.3 PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.
    phpoffice/phpexcel 1.8.0 PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine
    phpseclib/phpseclib dev-master b54b5b5 PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.
    phpspec/prophecy v1.6.1 Highly opinionated mocking framework for PHP 5.3+
    phpunit/php-code-coverage 3.3.3 Library that provides collection, processing, and rendering functionality for PHP code coverage information.
    phpunit/php-file-iterator 1.4.1 FilterIterator implementation that filters files based on a list of suffixes.
    phpunit/php-invoker 1.1.4 Utility class for invoking callables with a timeout.
    phpunit/php-text-template 1.2.1 Simple template engine.
    phpunit/php-timer 1.0.8 Utility class for timing
    phpunit/php-token-stream 1.4.8 Wrapper around PHP's tokenizer extension.
    phpunit/phpunit 5.3.5 The PHP Unit Testing framework.
    phpunit/phpunit-mock-objects 3.1.3 Mock Object library for PHPUnit
    psr/http-message 1.0.1 Common interface for HTTP messages
    psr/log 1.0.2 Common interface for logging libraries
    pusher/pusher-php-server v2.6.0 Library for interacting with the Pusher REST API
    sebastian/code-unit-reverse-lookup 1.0.0 Looks up which function or method a line of code belongs to
    sebastian/comparator 1.2.0 Provides the functionality to compare PHP values for equality
    sebastian/diff 1.4.1 Diff implementation
    sebastian/environment 1.3.8 Provides functionality to handle HHVM/PHP environments
    sebastian/exporter 1.2.2 Provides the functionality to export PHP variables for visualization
    sebastian/global-state 1.1.1 Snapshotting of global state
    sebastian/object-enumerator 1.0.0 Traverses array structures and object graphs to enumerate all referenced objects
    sebastian/recursion-context 1.0.2 Provides functionality to recursively process PHP variables
    sebastian/resource-operations 1.0.0 Provides a list of PHP built-in functions that operate on resources
    sebastian/version 2.0.0 Library that helps with managing the version number of Git-hosted PHP projects
    sentry/sentry 0.22.0 A PHP client for Sentry (http://getsentry.com)
    setasign/fpdf 1.8.1 FPDF is a PHP class which allows to generate PDF files with pure PHP. F from FPDF stands for Free: you may use it for any kind of usage and ...
    setasign/fpdi 1.6.1 FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Bec...
    setasign/fpdi-fpdf 1.6.1 Kind of metadata package for dependencies of the latest versions of FPDI and FPDF.
    sinergi/browser-detector 5.0.1 Detecting the user's browser, operating system and language.
    squizlabs/php_codesniffer 1.5.6 PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.
    sunra/php-simple-html-dom-parser v1.5.0 Composer adaptation of: A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way! Require PHP 5+. Supports invalid HTML...
    symfony/browser-kit v3.1.6 Symfony BrowserKit Component
    symfony/config v3.1.5 Symfony Config Component
    symfony/console v3.1.6 Symfony Console Component
    symfony/css-selector v3.1.6 Symfony CssSelector Component
    symfony/debug v3.1.6 Symfony Debug Component
    symfony/dependency-injection v3.1.5 Symfony DependencyInjection Component
    symfony/dom-crawler v3.1.6 Symfony DomCrawler Component
    symfony/event-dispatcher v2.8.13 Symfony EventDispatcher Component
    symfony/filesystem v3.1.5 Symfony Filesystem Component
    symfony/finder v3.1.6 Symfony Finder Component
    symfony/polyfill-mbstring v1.3.0 Symfony polyfill for the Mbstring extension
    symfony/polyfill-php56 v1.2.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
    symfony/polyfill-util v1.2.0 Symfony utilities for portability of PHP codes
    symfony/process v3.1.5 Symfony Process Component
    symfony/stopwatch v3.1.5 Symfony Stopwatch Component
    symfony/translation v3.1.5 Symfony Translation Component
    symfony/yaml v2.7.0 Symfony Yaml Component
    tecnickcom/tcpdf 6.2.12 TCPDF is a PHP class for generating PDF documents and barcodes.
    theiconic/php-ga-measurement-protocol v2.4.0 Send data to Google Analytics from the server using PHP. This library fully implements GA measurement protocol.
    thomseddon/oauth2-php dev-master e01d93d CakePHP OAuth2 Server Plugin
    vovkin/redlock-php dev-master 7bb98b7 Redis distributed locks in PHP
    webmozart/assert 1.1.0 Assertions to validate method input/output with nice error messages.
    wildbit/postmark-php 2.2.0 The officially supported client for Postmark (http://postmarkapp.com)
    zendframework/zend-code 3.0.4 provides facilities to generate arbitrary code using an object oriented interface
    zendframework/zend-escaper 2.5.2
    zendframework/zend-eventmanager 3.0.1 Trigger and listen to events within a PHP application
    zendframework/zend-http 2.5.5 provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests
    zendframework/zend-loader 2.5.1
    zendframework/zend-math 3.0.0
    zendframework/zend-server 2.7.0
    zendframework/zend-stdlib 3.1.0
    zendframework/zend-uri 2.5.2 a component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)
    zendframework/zend-validator 2.8.1 provides a set of commonly needed validators
    zendframework/zend-xmlrpc 2.6.0
    zendframework/zendxml 1.0.2 Utility library for XML usage, best practices, and security in PHP
  • Suite configuration:
class_name: AcceptanceTester
modules:
    enabled:
        - Db:
             dsn: '****'
             user: '****'
             password: '****'
             populate: false
             cleanup: false
             reconnect: true
        - AngularJS:
             el: html
             browser: chrome
             restart: true
             wait: 1
             url: 'https://k2gocake.dev'
             script_timeout: 20
             window_size: 1920x1080
             capabilities:
                 chromeOptions:
                     mobileEmulation:
                        deviceMetrics:
                            width: 1920
                            height: 1080
                            pixelRatio: 3,
                        userAgent: 'Mozilla/5.0 (iPad; CPU OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1 AcceptTest'
        - Asserts:
        - REST:
            depends: PhpBrowser
            url: 'https://k2gocake.dev'
env:
    firefox:
        modules:
            config:
                AngularJS:
                    browser: firefox
                    capabilities:
                        unexpectedAlertBehaviour: 'accept'
                        chromeOptions:

    browserstack:
        modules:
            config:
                AngularJS:
                    browser: edge
                    url: 'https://testing.kaartje2go.nl'
                    host: '****'
                    capabilities:
                        os: Windows
                        os_version: 10
                        chromeoptions:

    testrunner:
        modules:
            config:
                Db:
                    dsn: '****'
                    user: '****'
                    password: '****'
                AngularJS:
                    url: 'https://testing.kaartje2go.nl'
                REST:
                    url: 'https://testing.kaartje2go.nl'
@Naktibalda
Copy link
Member

@DavertMik it is your feature, please respond.

@DavertMik
Copy link
Member

DavertMik commented Nov 19, 2016

Unfortunately it works for global config only. Suite configs are overriding global configs.

However you can try to update it like:

./codecept run -o "modules: config: AngularJS: url: localhost.net"

@InputOutput
Copy link
Author

Ok thanks for the explanation, unfortunately I don't see how this will work in our setup.

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