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

shared sessionStrategy: UnknownError when getSession() called in second test method #661

Closed
Jodes81 opened this issue Jul 25, 2015 · 5 comments

Comments

@Jodes81
Copy link

Jodes81 commented Jul 25, 2015

I have come across the error when modifying the "GeneralTest" class given in the examples.

To reproduce:

  1. I add this to the $browser array: 'sessionStrategy' => 'shared'
  2. 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.

@aik099
Copy link
Member

aik099 commented Jul 25, 2015

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.

@aik099
Copy link
Member

aik099 commented Jul 25, 2015

Can you please describe what you want to achieve instead?

@Jodes81
Copy link
Author

Jodes81 commented Jul 26, 2015

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

@Jodes81 Jodes81 closed this as completed Jul 26, 2015
@aik099
Copy link
Member

aik099 commented Jul 26, 2015

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.

@Jodes81
Copy link
Author

Jodes81 commented Jul 27, 2015

I have raised the issue for phpunit-mink here:

minkphp/phpunit-mink#53

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

2 participants