...
Smoke tests or other categories can be grouped so all tests within a single test class are run. However, many times you might only want a subset of tests to be run during the smoke tests, as each test extends the time of each developer's build. To make a single test method run during the smoke group, you need to add the testng groups parameter before your test method. e.g. @Test(groups = "smoke")
. Also, when flagging a single test method, the BeforeMethod and AfterMethod in your test class must always be run by adding (alwaysRun = true)
. See ClientTest.java for an example.
Existing Helpers
Helper class | Description |
---|---|
CollectionSheetEntryTestHelper |
|
BatchJobHelper |
|
OfficeHelper |
|
SavingsAccountHelper |
|
HolidayTestHelper |
|
CustomPropertiesHelper |
|
AdminTestHelper |
|
CenterTestHelper |
|
FormParametersHelper |
|
ReportTestHelper |
|
ClientTestHelper |
|
UserHelper |
|
NavigationHelper |
|
QuestionGroupTestHelper |
|
GroupTestHelper |
|
LoanTestHelper |
|
SavingsProductHelper |
|
FeeTestHelper |
|
OfficeHelper |
|
FeesHelper |
|
LoanProductTestHelper |
|
Troubleshooting
- Skype installs a Firefox extension that can cause Selenium RC to crash. Workaround is to remove the Skype extension from your Firefox or Chrome instance.
- If your test runs correctly when ran alone but fails with the error message "ERROR Server Exception: sessionId should not be null; has this session been started yet?", make sure that you have a @ContextConfiguration line before your class definition (see ClientLoanRepaymentPeriodTest).
- If your test doesn't run together with the other suites, make sure that the class name matches one of:
Test, Test
or*TestCase
.
DB unit dependency
As part of MIFOS-45904590 , there is currently an on-going effort to refactor the current suite of acceptance tests to minimize dependency on the DB unit based XML datasets. As a result, a new test group, no_db_unit, has been introduced to categorize tests that do not need DB unit dependency. Currently, the Maven POM for acceptance tests, ensures that all tests in the no_db_unit group are executed prior to executing the rest of the acceptance tests. This ensures that the no_db_unit group of tests do not inadvertently depend on the XML data sets used by the older tests.
...