Skip to content

in2code-de/stack-test

Repository files navigation

📦 Migration Notice
This package was originally hosted at gitlab.com/co-stack.com/php-packages/stack-test. It is now maintained by in2code GmbH.

  • Old location: co-stack.com/php-packages/stack-test (no longer available)
  • New location: github.com/in2code-de/stack-test
  • Composer name: co-stack/stack-test (unchanged)

co-stack/stack-test - enhance your PHPUnit with Browser testing

Features

  • No configuration to get started.
  • Countless assertions for any possible assertion of elements, contents, ...
  • Assertions can also be used as conditions and expectations (to wait for something to happen in the browser)
  • Far less complicated than testing Frameworks like codeception
  • Solely based on PHPUnit, therefore fully integrated into PhpStorm.
  • Easy Form handling (get and set form data)

Enable screenshots and more for failed tests

<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd"
>
    <!-- Add the extension section to your phpunit.xml file and adjust the paths as needed -->
    <extensions>
        <bootstrap class="CoStack\StackTest\Bootstrap">
            <parameter name="screenshot" value="build/test/artifacts/{testClass}/{testMethod}/{seed}.jpg"/>
            <parameter name="pageSource" value="build/test/artifacts/{testClass}/{testMethod}/{seed}.html"/>
            <parameter name="history" value="build/test/artifacts/{testClass}/{testMethod}/{seed}.history.txt"/>
        </bootstrap>
    </extensions>
</phpunit>

Important things to know

  • Firefox always sets cookie secure = true
  • Options without value attribute can not be selected by value

About

This is a fork from the dropped co-stack package https://gitlab.com/co-stack.com/co-stack.com/php-packages/stack-test

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •