Functional tests fail on behave-testuser login
varac opened this issue · comments
Varac commented
reproducible on unstable.pix i.e.:
Thu May 19 12:27:01 CEST 2016
@staging
Feature: account # ../srv/leap/tests_custom/functional-tests/account.feature:17
@register
Scenario: user goes to signup-page # ../srv/leap/tests_custom/functional-tests/account.feature:20
When I visit the signup-page # ../srv/leap/tests_custom/functional-tests/steps/account.py:60
Then I should see a signup button # ../srv/leap/tests_custom/functional-tests/steps/account.py:65
@register
Scenario: user goes to signup-page and registers new account # ../srv/leap/tests_custom/functional-tests/account.feature:25
When I visit the signup-page # ../srv/leap/tests_custom/functional-tests/steps/account.py:60
And I register # ../srv/leap/tests_custom/functional-tests/steps/account.py:70
Then I see the control-panel # ../srv/leap/tests_custom/functional-tests/steps/account.py:80
@login
Scenario: user goes to user-agent # ../srv/leap/tests_custom/functional-tests/account.feature:31
When I visit the user-agent # ../srv/leap/tests_custom/functional-tests/steps/account.py:29
Then I should see a login button # ../srv/leap/tests_custom/functional-tests/steps/account.py:34
@login
Scenario: user goes to user-agent and enters credentials # ../srv/leap/tests_custom/functional-tests/account.feature:36
When I visit the user-agent # ../srv/leap/tests_custom/functional-tests/steps/account.py:29
And I login # ../srv/leap/tests_custom/functional-tests/steps/account.py:39
Then I see the inbox # ../srv/leap/tests_custom/functional-tests/steps/account.py:46
@logout
Scenario: user logs out # ../srv/leap/tests_custom/functional-tests/account.feature:42
When I visit the user-agent # ../srv/leap/tests_custom/functional-tests/steps/account.py:29
And I login # ../srv/leap/tests_custom/functional-tests/steps/account.py:39
When I logout # ../srv/leap/tests_custom/functional-tests/steps/account.py:55
And I visit the user-agent # ../srv/leap/tests_custom/functional-tests/steps/account.py:29
Then I should see a login button # ../srv/leap/tests_custom/functional-tests/steps/account.py:34
@staging
Feature: send_mail # ../srv/leap/tests_custom/functional-tests/send_mail.feature:18
@mail_to_myself
Scenario: user logs in end sends a mail to self # ../srv/leap/tests_custom/functional-tests/send_mail.feature:21
Given I login as behave-testuser # ../srv/leap/tests_custom/functional-tests/steps/send_mail.py:29
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/behave/model.py", line 1456, in run
match.run(runner.context)
File "/usr/local/lib/python2.7/dist-packages/behave/model.py", line 1903, in run
self.func(context, *args, **kwargs)
File "../srv/leap/tests_custom/functional-tests/steps/send_mail.py", line 33, in step_impl
login_page.enter_username(behave_testuser()).enter_password(behave_password()).login()
File "/srv/leap/tests_custom/functional-tests/page_objects/login_page.py", line 40, in login
self._login_button().click()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webelement.py", line 75, in click
self._execute(Command.CLICK_ELEMENT)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webelement.py", line 469, in _execute
return self._parent.execute(command, params)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 201, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 193, in check_response
raise exception_class(message, screen, stacktrace)
TimeoutException: Message: {"errorMessage":"Click failed: timeout","request":{"headers":{"Accept":"application/json","Accept-Encoding":"identity","Connection":"close","Content-Length":"81","Content-Type":"application/json;charset=UTF-8","Host":"127.0.0.1:60278","User-Agent":"Python-urllib/2.7"},"httpVersion":"1.1","method":"POST","post":"{"sessionId": "8ca039b0-1dac-11e6-97c1-fd4cfa116d8b", "id": ":wdc:1463653761479"}","url":"/click","urlParsed":{"anchor":"","query":"","file":"click","directory":"/","path":"/click","relative":"/click","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/click","queryKey":{},"chunks":["click"]},"urlOriginal":"/session/8ca039b0-1dac-11e6-97c1-fd4cfa116d8b/element/:wdc:1463653761479/click"}}
When I send a mail to myself # None
When I open the email # None
Then I see a encrypted flag # None
@unencrypted
Scenario: user receives an unencrypted email # ../srv/leap/tests_custom/functional-tests/send_mail.feature:29
Given I send an unencrypted email # ../srv/leap/tests_custom/functional-tests/steps/send_mail.py:37
And I login as behave-testuser # ../srv/leap/tests_custom/functional-tests/steps/send_mail.py:29
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/behave/model.py", line 1456, in run
match.run(runner.context)
File "/usr/local/lib/python2.7/dist-packages/behave/model.py", line 1903, in run
self.func(context, *args, **kwargs)
File "../srv/leap/tests_custom/functional-tests/steps/send_mail.py", line 33, in step_impl
login_page.enter_username(behave_testuser()).enter_password(behave_password()).login()
File "/srv/leap/tests_custom/functional-tests/page_objects/login_page.py", line 40, in login
self._login_button().click()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webelement.py", line 75, in click
self._execute(Command.CLICK_ELEMENT)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webelement.py", line 469, in _execute
return self._parent.execute(command, params)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 201, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 193, in check_response
raise exception_class(message, screen, stacktrace)
TimeoutException: Message: {"errorMessage":"Click failed: timeout","request":{"headers":{"Accept":"application/json","Accept-Encoding":"identity","Connection":"close","Content-Length":"81","Content-Type":"application/json;charset=UTF-8","Host":"127.0.0.1:60278","User-Agent":"Python-urllib/2.7"},"httpVersion":"1.1","method":"POST","post":"{"sessionId": "8ca039b0-1dac-11e6-97c1-fd4cfa116d8b", "id": ":wdc:1463653822890"}","url":"/click","urlParsed":{"anchor":"","query":"","file":"click","directory":"/","path":"/click","relative":"/click","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/click","queryKey":{},"chunks":["click"]},"urlOriginal":"/session/8ca039b0-1dac-11e6-97c1-fd4cfa116d8b/element/:wdc:1463653822890/click"}}
When I open the unencrypted email # None
Then I see a unencrypted email flag # None
Failing scenarios:
../srv/leap/tests_custom/functional-tests/send_mail.feature:21 user logs in end sends a mail to self
../srv/leap/tests_custom/functional-tests/send_mail.feature:29 user receives an unencrypted email
1 feature passed, 1 failed, 6 skipped
5 scenarios passed, 2 failed, 9 skipped
16 steps passed, 2 failed, 67 skipped, 0 undefined
Took 4m9.249s
i tried to login manally to the account and login didn't finish.
i'll re-create the account now and see if this fixes it.
Varac commented
yes, recreating the behave-testuser fixed the problem. We should probably purge the db after running the functional tests each time so the account doesn't bloat too much.
Christoph commented
the user was not completely removed. we removed it and then it worked again