Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

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

  • 25-09-2013 03:48PM
    #1
    Registered Users, Registered Users 2 Posts: 5,753 ✭✭✭


    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