Does codepro junit test case generation gives 100% code coverage ?

198 views
Skip to first unread message

Anindita Ghatak

unread,
Dec 4, 2014, 12:15:34 AM12/4/14
to codepro-...@googlegroups.com
Hi,
I have generated junit test case using codepro junit test case generation.But I cannot see expected inputs are also getting generated.It's generating multiple methods by calling same function.Please find below the generated methods -

 @Test
    public void testCreateCredentialByRegEx_1() throws Exception {
        CredentialProvider fixture = new CredentialProvider(new Client("", "", "", 1, 1, 1), new ErrorMessages(new ClassPathXmlApplicationContext()), "", "", "", new ClaimsBasedTicketConverter());
        String authorization = "";
        String assetId = "";
        String originatingAssetId = "";
        String methodName = "";
        URI uri = new URI("");
        String realmId = "";
        Credential result = fixture.createCredentialByRegEx(authorization, assetId, originatingAssetId, methodName, uri, realmId);
        assertNotNull(result);
    }


 @Test
    public void testCreateCredentialByRegEx_2() throws Exception {
        CredentialProvider fixture = new CredentialProvider(new Client("", "", "", 1, 1, 1), new ErrorMessages(new ClassPathXmlApplicationContext()), "", "", "", new ClaimsBasedTicketConverter());
        String authorization = "";
        String assetId = "";
        String originatingAssetId = "";
        String methodName = "";
        URI uri = new URI("");
        String realmId = "";

        Credential result = fixture.createCredentialByRegEx(authorization, assetId, originatingAssetId, methodName, uri, realmId);
        assertNotNull(result);
    }

Am I missing some configuration ? Please help.How can I generate a test class with automatic coverage?

Thanks & Regards,
Anindita
Reply all
Reply to author
Forward
0 new messages