Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Passing data to testNG for pre-checks before test case runs

Options
  • 25-09-2013 3:48pm
    #1
    Registered Users Posts: 5,542 ✭✭✭


    Im using testNG to write some auto test cases.

    In the below example, i want to use some data in my actual pre checks before deciding whether the test itself is worth running. Ive dug through testNG and the best annotation i can find is BeforeTest


    @BeforeTest
    public void prepareTestCase(List<String> Elements){

    //Some code here that uses Elements list

    }


    However, it doesnt seem to work. Output from Java is

    2013-09-25 14:49:56,224 [CppFMAlarmsSuite] [ERROR] [se.ericsson.jcat.fw.ng.liste
    ners.JcatTestListener] <b> Testcase myTestCase has been skipped (Failure in co
    nfiguration method or in depends methods)</b>


    It seems to not bother running due to this.


Advertisement