We have our automation scripts within Bitbucket for multiple applications. This is an on-going activity wherein, we will keep adding scripts to bitbucket on daily basis. The testcases are written inside a .java file. A testcase can be identified with a tag “@Test”. The below example is a single testcase. We like a count returned for all the testcases in the repo
Eg:
public void whenRequestingAPolicy_thenSubmitTheRequest() {
start();
AccountSummaryUser user = new UserFactory().retrieveAccountSummaryData("commonUser1Ifbi");
new LoginPage(driver).submitLogin(user.getUsername(), user.getPassword());
ContactUsPage contactUsPage = new MenuWorkflow(driver).accessContactUs();
assertTrue(contactUsPage.isAt());
contactUsPage.selectATopicDropdown.select("Policy");
Select options = new Select(contactUsPage.selectAPolicyTypeElement);
options.selectByIndex(3);
String requestAPolicyComments = randomAlphanumeric(8);
contactUsPage.comments.input(requestAPolicyComments);
ContactUsConfirmationPage contactUsConfirmationPage = contactUsPage.clickContinueButton();
assertTrue(contactUsConfirmationPage.isAtContactUsConfirmation());
dateTimeTestScript = new DateTime();
System.out.println("CONTACT IS POLICY EMAIL SENT TIME TEST SCTIPT " + dateTimeTestScript);
assertEquals("Customer Topic: Policy", new OwaPage(driver).getContactUsText(requestAPolicyComments));
}
I tried the search option in BitBucket for "@Test" but it returns all code that has the value "test".
I don't have a direct solution - but what about parsing test result files / reports?
Yes - your CI system would make test results and stats readily available.
I assumed that you need to 'count' tests to report on increased test coverage/count?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.