Customised doc generation in Javadoc using Gradle

62 views Asked by At

I have many test cases written in a JAVA file. I need to generate separate docs based on groups like:

@Test(groups = { Constant.UT_POSITIVE } OR @Test(groups = { Constant.UT_NEGATIVE }

So, below two test cases should move to two different java docs based on groups

Any help will be appreciated

/**
 * TESTCASE for successful GET of user.
 *
 * @throws Exception In case of exception scenario
 * @ExpectedResponseCode 200 ( Successful Retrieval )
 */

@Test(groups = { Constant.UT_POSITIVE })
public void testGetUserSuccess() throws Exception {
    mockValidateUser();
    MockCUserDAOImpl.getResponseCode = Constant.RESPONSE_CODE_SUCCESS_DB_GET;
    getResponse = testConsumer
            .getUser(
                    CONSUMER_GUID, CUSTOMER_GUID, AUTHORIZATION);
    Assert.assertEquals(getResponse.getStatus(),
            Constant.RESPONSE_CODE_SUCCESS);
}


 /**
 * TESTCASE for failed GET of user.
 *
 * @throws Exception In case of exception scenario
 * @ExpectedResponseCode 400 ( failed Retrieval )
 */

@Test(groups = { Constant.UT_NEGATIVE})
public void testGetUserSuccess() throws Exception {
    mockValidateUser();
    MockCUserDAOImpl.getResponseCode = Constant.RESPONSE_CODE_SUCCESS_DB_GET;
    getResponse = testConsumer
            .getUser(
                    CONSUMER_GUID, CUSTOMER_GUID, AUTHORIZATION);
    Assert.assertEquals(getResponse.getStatus(),
            Constant.RESPONSE_CODE_SUCCESS);
}
0

There are 0 answers