Use Behat/Mink Context


#1

Hi,

I want to use Hiptest with Behat/Mink automation but i have some problem to interact with MinkContext:

  • The MinkContext actionwords must be created in hiptest to be used in my scenario,
  • The Hiptest-Publisher app generate this actionwords and make conflict with MinkContext déclaration,
  • I can’t call Mink actionwords from another actionword.

Have you got some tips to use third-party context in Hiptest scenario ?

Thanks a lot.
Eric.


#2

Hey
how do you approach to use hiptest publisher exactly, iirc there are at least two ways to do it
the default one and extended one - https://github.com/hiptest/hiptest-publisher/blob/master/docs/Behat%20integration.md
I think if you try it in the way it says in the doc - you will be able to keep default MinkContext
Let me know if it works for you


#3

Hi,

Thanks for your response but it’s not really what I want.

With your solution I can split the implementation of actionwords in several context.
But I want to automaticaly call external thrid-party context from my FeatureContext/Actionword classes.

For example, I want to call “I am on ${url}” definded in Behat/MinkContext, from a scenario or an another actionword.

Eric.


#4

hi
just extend then MinkContext with your own class where you can have all step definition, in the implementation of the just call respective method from MinkContext


#5

Have you got some example ? I don’t understand well …

I search a solution that don’t need any developpement each time i create a new actionword.

Exemple 1 - Scénario with Mink Actionwords:
Given I am on http://www.google.fr
Then I should see Google

Exemple 2 - Actionwords:
Given I am on http://www.google.fr
Then I should be on Google search page

with actionword “I should be on Google search page” define as a sequence of Mink Action words:
I should see "Google"
I should see a Input#q element

So I need to setup my project with some elements to link the generated actionwords with Mink and other third parties context like Behatch or our enterprise context. After that we can use them and call them in hiptest without developpement.

Thanks a lot.