Giter Site home page Giter Site logo

flowpack.behat's Issues

Saucelabs setup

How is the correct Setup to use Behat with Saucelabs?
The headless scenarios with Behat works, but scenarios marked mit @javascript ends up with the message:

[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
Unrecognized options "saucelabs" under "behat.extensions.behat_minkextension_extension"

RoleRepository class not available in Flow 3.0.x

Running tests that reset/prepare some fixtures, I see the following red error message within the CLI output of Behat:

[TYPO3\Flow\Object\Exception\UnknownObjectException]
Exception has been thrown in "beforeScenario" hook, defined in FeatureContext::resetFixtures()

Object "TYPO3\Flow\Security\Policy\RoleRepository" is not registered.

I tracked it down to the Flowpack\Behat\Tests\Behat\FlowContext class on line 229:

    /**
 * Reset policy service and role repository
 *
 * This is needed to remove cached role entities after resetting the database.
 *
 * @return void
 */
protected function resetRolesAndPolicyService() {
    $this->objectManager->get('TYPO3\Flow\Security\Policy\PolicyService')->reset();

    $roleRepository = $this->objectManager->get('TYPO3\Flow\Security\Policy\RoleRepository');
    \TYPO3\Flow\Reflection\ObjectAccess::setProperty($roleRepository, 'newRoles', array(), TRUE);
}

If I just comment the last two lines of code within this method, it seems to work and no Error is shown again.

I'm seeing this with Flow 3.0.0-rc1 and I guess the commit that causes this was: https://git.typo3.org/Packages/TYPO3.Flow.git/commitdiff/7e33515840cbe94f0e578bd2444442ac5d1586da

Mac compatibility (wget)

Hi,

I'm just getting started with behat and noticed a small "bug":
The behat:setup command depends on wget, which is not supported on any Mac OS X version

I would just change it to curl, but I don't know if that would cause some other incompatibilities without auto-detection.

Reset test fixtures does not work for scenario outlines

We have type hint that is too strict in the beforeScenario hook:

Exception has been thrown in "beforeScenario" hook, defined in Flowpack\Behat\Tests\Behat\FlowContext::resetTestFixtures()
Catchable Fatal Error: Argument 1 passed to Flowpack\Behat\Tests\Behat\FlowContext::resetTestFixtures() must be an instance of Behat\Behat\Event\ScenarioEvent, instance of Behat\Behat\Event\OutlineExampleEvent 

selenium-server no longer available on googlecode.com

The selenium-server is no longer available through http://selenium.googlecode.com/files/ ("404"). So behat:setup ends with:

Warning: rename(/data/www/typo3-app/selenium-server-standalone-2.39.0.jar,/data/www/typo3-app/bin/selenium-server.jar): No such file or directory in /data/www/typo3-app/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Flowpack_Behat_Command_BehatCommandController.php line 56

Which will fail docker builds that try to do that (i.e. million12 images).

Latest version seems to be downloadeable here:

http://selenium-release.storage.googleapis.com/index.html?path=2.53/

Explain a working setup

I seem to have trouble with running Behat tests:

As far as I see, the CLI execution runs in the FLOW_CONTEXT "Testing/Behat". Calling the application via the webserver fails constantly with the following exception (configured to the same context):
#1222268609: Access denied (0 denied, 0 granted, 1 abstained)

When I switch the web-server config to context "Development/Behat" and add the proper DB credentials it seems to work.

What's the proper setup? Which context should actually be used a) for the CLI and b) for accessing the web-based app via the webserver (e.g. via the browser, but also via Behat that accesses the application via the webserver).

consoleLoggingCaptureAspect not injected

After updating from v2.4.0 to v2.4.1 today, I've ran into the following issue when executing the tests:

PHP Fatal error: Call to a member function disableOutput() on a non-object in /var/www/XYZ/Packages/Application/Flowpack.Behat/Tests/Behat/FlowContext.php on line 99

This happens while resetting the fixtures via a CLI command within the to-be-tested application package which is executed like:

    /**
     * Resets the database and creates some basic data set for testing
     *
     * @BeforeScenario
     */
    public function resetFixtures() {
        $this->flowContext->iRunTheCommand('foo.bar:testing:resetapplicationfortesting');
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.