shared sessionStrategy: UnknownError when getSession() called in second test method
I have come across the error when modifying the "GeneralTest" class given in the examples.
To reproduce:
- I add this to the $browser array: 'sessionStrategy' => 'shared'
- I copy the method testUsingSession() and paste as testUsingSession2()
For now, the only workaround I have is to omit the shared session declaration and have a new browser window load for each test method - very slow.
The shared session concept comes from https://github.com/minkphp/phpunit-mink repo. You should be reporting there instead of this https://github.com/minkphp/Mink repo.
Can you please describe what you want to achieve instead?
It's my first project with Mink and Behat and am still getting a feel for it all. Thanks for pointing out phpunit-mink, I understand now.
I just wanted to speed up tests, sharing sessions seems like a fundamental I need to get working!
Thanks for your help
When you create task in correct repo post link to it here so it can be tracked properly.
Talking about terminology:
- Behat + Mink = use gherkin language to write scenarios + run them using Behat feature context classes
- PHPUnit-Mink + Mink = write PHPUnit tests directly using Mink language
PHPUnit-Mink + Behat + Mink isn't really a possibility, because you can use either 2 together.
I have raised the issue for phpunit-mink here:
https://github.com/minkphp/phpunit-mink/issues/53