use of com.seleniumtests.connectors.bugtracker.BugTracker in project seleniumRobot by bhecquet.
the class TestBugTracker method testJiraBugtracker.
@Test(groups = { "ut" })
public void testJiraBugtracker() throws Exception {
PowerMockito.whenNew(JiraConnector.class).withAnyArguments().thenReturn(jiraConnector);
BugTracker bugtracker = BugTracker.getInstance("jira", "http://foo/bar", "selenium", "user", "password", new HashMap<>());
Assert.assertTrue(bugtracker instanceof JiraConnector);
}
use of com.seleniumtests.connectors.bugtracker.BugTracker in project seleniumRobot by bhecquet.
the class TestBugTracker method testCreateIssueBeanNoEndStep.
/**
* If no Test end steps are available, do not create IssueBean
* @throws Exception
*/
@Test(groups = { "ut" })
public void testCreateIssueBeanNoEndStep() throws Exception {
FakeBugTracker fbt = spy(new FakeBugTracker());
PowerMockito.whenNew(FakeBugTracker.class).withAnyArguments().thenReturn(fbt);
BugTracker bugtracker = BugTracker.getInstance("fake", "http://foo/bar", "selenium", "user", "password", new HashMap<>());
IssueBean issueBean = bugtracker.createIssueBean("[Selenium][selenium][DEV][ngName] test myTest KO", "myTest", "some description", Arrays.asList(step1), issueOptions);
Assert.assertNull(issueBean);
}
use of com.seleniumtests.connectors.bugtracker.BugTracker in project seleniumRobot by bhecquet.
the class TestBugTracker method testDoNotCreateIssueBeanWithStepDisabled.
/**
* Test that if the failed step disables bugtracker, the issue bean is not created
* @throws Exception
*/
@Test(groups = { "ut" })
public void testDoNotCreateIssueBeanWithStepDisabled() throws Exception {
FakeBugTracker fbt = spy(new FakeBugTracker());
PowerMockito.whenNew(FakeBugTracker.class).withAnyArguments().thenReturn(fbt);
BugTracker bugtracker = BugTracker.getInstance("fake", "http://foo/bar", "selenium", "user", "password", new HashMap<>());
IssueBean issueBean = bugtracker.createIssueBean("[Selenium][selenium][DEV][ngName] test myTest KO", "testDoNotCreateIssueBeanWithStepDisabled", "some description", Arrays.asList(step1, stepFailedWithDisabledBugtracker, stepEnd), issueOptions);
Assert.assertNull(issueBean);
}
Aggregations