Codeception: Friend killed after Suite

Created on 23 Feb 2016  路  2Comments  路  Source: Codeception/Codeception

Hello,

When I use haveFriend/does in a test case of Cest File the new window is closing at the end of the suite.

My conf is restart: true so I'm expected to kill all the windows after each test case.

    public function testFriend1(AcceptanceTester $I)
    {
        $toto = $I->haveFriend('toto', $I);
        $toto->does(function($I) {
            $I->amOnUrl('http://localhost/toto-friend');
        });

        $I->amOnUrl('http://localhost/toto-nofriend');
    }

    public function testFriend2(AcceptanceTester $I)
    {
        $titi = $I->haveFriend('titi', $I);
        $titi->does(function($I) {
            $I->amOnUrl('http://localhost/titi-friend');
        });
        $I->amOnUrl('http://localhost/titi-nofriend');
    }

Actual behaviour (order by closed windows) :

At the end of the test case testFriend1

  1. toto-nofriend

At the end of the test case testFriend2

  1. titi-nofriend

At the end of the test suite

  1. toto-friend
  2. titi-friend

Expected behaviour (order by closed windows) :

At the end of the test case testFriend1

  1. toto-nofriend
  2. toto-friend

At the end of the test case testFriend2

  1. titi-nofriend
  2. titi-friend
BUG WebDriver

Most helpful comment

Sorry for your friend... :)

All 2 comments

Sorry for your friend... :)

So what I suspect is that friend is killed when Actor is killed because this is Actor that have friends.

Unfortunately, all actors injected in the test case are killed at the end of the test suite. I'm not sure it's good for performance.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Breadleyg picture Breadleyg  路  3Comments

allen0817 picture allen0817  路  3Comments

jterry picture jterry  路  3Comments

DavertMik picture DavertMik  路  4Comments

marcelodeandrade picture marcelodeandrade  路  3Comments