There are existing utility functions in pykolab which interact with the webadmin API of a Kolab server in order to create/purge user accounts for integration tests. These should be integrated into a well documented set of tools that can be used in CI for automated integration testing.
Description
Description
Details
Details
- Ticket Type
- Task
Status | Assigned | Task | ||
---|---|---|---|---|
Resolved | bruederli | T167 Establish an integration test environment for Roundcube | ||
Resolved | bruederli | T178 Extract webadmin utility scripts from pykolab |
Event Timeline
Comment Actions
I've created a set of functions/classes that would allow for Selenium-based integration tests to be written like this example for T153:
import unittest from pytest import KolabSeleniumTest class TestT153(KolabSeleniumTest): """ Test case for Bug: Quering for a delegation user results in server error https://git.kolab.org/T153 """ @classmethod def setUpClass(self, *args, **kw): # define user accounts required for this test self.john = self.require_user("John", "Doe") self.jane = self.require_user("Jane", "Mitchell") KolabSeleniumTest.setUpClass(self, *args, **kw) def test_001_add_delegate(self): self.roundcube_login(self.john['mail'], self.john['userpassword']) # open delegation screen self.roundcube_open('settings','plugin.delegation') env = self.get_env() self.assertEqual(env.get('task'), 'settings') # open delegation form self.driver.get(self.roundcube_url('settings','plugin.delegation', _framed=1)) elem = self.driver.find_element_by_css_selector('form input[name="delegate"]') elem.send_keys(self.jane['givenname']) self.wait_loading() # check autocompletion li = self.driver.find_element_by_css_selector('#rcmKSearchpane li:first-child') self.assertIn(self.jane['sn'], str(li.text), "Autocompletion list")
This is just an example of an actual issue we'd like to get tested in CI. The Selenium tests run in a headless PhantomJS environment and are inspired by TBits' test suite.
Comment Actions
Initial import in rQAdcdad2a025a3
More things to be considered:
- Dependencies: combine individual tests in suites with appropriate dependencies
- Flags: allow to define tests as Todo, prototype or fatal; assign percentage values?