Given I have a table named 'table' in a PG database with data ...and you can write a specific implementation for your PG database; so if your component uses PDO, would you instantiante a PDO instance in your test with a DSN pointing to a test db? In a situation where this could be swapped out for another DSN connecting to a different type of database (with it's own implementation) you'd set all that up a second time? This just seems like the wrong way to go about things and I'm not sure how to go about it.
Hello @Anyqax , question is why? test with dependencies that can change state is dangerous. Why you need that?
I'm not refering to state dependencies between tests but rather logical "dependencies"
cases where e.g. when a simpler test A fails, it's just unneccessary to execute a more elabore test B because it's expected to fail as well and obfuscates the cause in the test result output
Hello, I am trying to automate behat test via Gitlab CI. Issue I've got is that in CI and in PHPStorm (executing same tests) I always get
WebDriver\Exception\NoSuchElement: Element not found with xpath, //html . From stack trace, I am not able to find anything. When I try to run locally (docker) via terminal test passes and everything works, but if I try to run then through PHPStorm I get the same error as in CI. I can't figure out what is wrong, it looks like selenium2 is not working correctly. And screenshots generated by test (when using PHPStorm and CI) are 0 byte.
My behat.yml file looks like:
default: suites: default: path: '%paths.base%/features' contexts: - App\Tests\Behat\FeatureContext - Behat\MinkExtension\Context\MinkContext extensions: FriendsOfBehat\SymfonyExtension: bootstrap: tests/bootstrap.php kernel: environment: test local_ff: extensions: FriendsOfBehat\SymfonyExtension: bootstrap: tests/bootstrap.php kernel: environment: test Behat\MinkExtension: base_url: http://behattest.test browser_name: firefox sessions: firefox: selenium2: wd_host: "http://selenium-hub:4444/wd/hub" browser: firefox capabilities: browser: firefox
When running in local terminal (docker) and using local_ff profile it works as expected