Hi Kevin, Your test method testJSONFilterFromJSONPathConditionFalseTestScenario() has dependsOnMethods = "testJSONFilterFromJSONPathConditionTrueTestScenario" that makes your test method testJSONFilterFromJSONPathConditionFalseTestScenario() depends on testJSONFilterFromJSONPathConditionTrueTestScenario() method. Since you have enabled=false your first method it won't run. Your second test method will only run after that. Because of that you're getting that exception.
Thanks, Iqbal On Tue, May 12, 2015 at 2:07 PM, Waruna Perera <[email protected]> wrote: > Hi Kevin, > > Are those only failing when run together or even as individual runs? > > > > On Tue, May 12, 2015 at 1:48 PM, Kevin Ratnasekera <[email protected]> wrote: > >> Hi Saneth, >> These are the two test case methods related to the exception, >> >> >> @Test(groups = {"wso2.esb"}, description = "Tests with filter mediator - >> JSON path Scenario - Filter condition true" , enabled=false) >> public void testJSONFilterFromJSONPathConditionTrueTestScenario() throws >> Exception { >> >> String JSON_PAYLOAD = "{\"album\":\"Hello\",\"singer\":\"Peter\"}"; >> >> WebResource webResource = client >> .resource(getProxyServiceURLHttp("JSONPathFilterWithJSONProxy")); >> >> // sending post request >> ClientResponse postResponse = webResource.type("application/json") >> .post(ClientResponse.class, JSON_PAYLOAD); >> >> assertEquals(postResponse.getType().toString(), "application/json", >> "Content-Type Should be application/json"); >> assertEquals(postResponse.getStatus(), 201, "Response status should be >> 201"); >> >> // Calling the GET request to verify Added album details >> ClientResponse getResponse = webResource.type("application/json") >> .get(ClientResponse.class); >> >> assertNotNull(getResponse, "Received Null response for while getting >> Music album details"); >> assertEquals(getResponse.getEntity(String.class), JSON_PAYLOAD, >> "Response mismatch for HTTP Get call"); >> } >> >> >> @Test(groups = {"wso2.esb"}, description = "Tests with filter mediator - >> JSON path Scenario Filter condition False", >> dependsOnMethods = >> "testJSONFilterFromJSONPathConditionTrueTestScenario") >> public void testJSONFilterFromJSONPathConditionFalseTestScenario() throws >> Exception { >> >> String JSON_PAYLOAD = "{\"album\":\"Moon\",\"singer\":\"Peter\"}"; >> >> WebResource webResource = client >> .resource(getProxyServiceURLHttp("FilterWithJSONProxy")); >> >> // sending post request >> ClientResponse postResponse = webResource.type("application/json") >> .post(ClientResponse.class, JSON_PAYLOAD); >> >> assertEquals(postResponse.getStatus(), 202, "Response status should be >> 202"); >> } >> >> Thanks >> Regards >> Kevin >> >> On Tue, May 12, 2015 at 1:43 PM, Saneth Dharmakeerthi <[email protected]> >> wrote: >> >>> Hi Kevin, >>> >>> Please share the full test case with us. >>> >>> Thanks and Best Regards, >>> >>> Saneth Dharmakeerthi >>> Senior Software Engineer >>> WSO2, Inc. >>> Mobile: +94772325511 >>> >>> On Tue, May 12, 2015 at 12:24 PM, Kevin Ratnasekera <[email protected]> >>> wrote: >>> >>>> Hi all, >>>> org.testng.TestNGException: >>>> org.wso2.carbon.esb.contenttype.json.FilterFromJSONPathTestCase.testJSONFilterFromJSONPathConditionFalseTestScenario() >>>> is depending on method public void >>>> org.wso2.carbon.esb.contenttype.json.FilterFromJSONPathTestCase.testJSONFilterFromJSONPathConditionTrueTestScenario() >>>> throws java.lang.Exception, which is not annotated with @Test >>>> >>>> I am running integration tests on java version 1.7. The failing test >>>> methods are depended on other methods. ( dependsOnMethods ) The classes >>>> which does not include depended test methods pass successfully. >>>> Regards >>>> Kevin >>>> >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Waruna Perera > Senior Software Engineer - Test Automation > Mobile: +94 77 3867037 > WSO2, Inc.; http://wso2.com/ > lean . enterprise . middlewear. > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Irham Iqbal Software Engineer - Test Automation WSO2, Inc.: http://wso2.com lean. enterprise. middleware phone: +94 777888452
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
