Forum Discussion

JeevakCC's avatar
JeevakCC
Occasional Contributor
7 years ago

TestNG and TestComplete Integration

I have integrated testNG into TC using POM.XML file but have to pass parameters dynamically from TC Routine to testNG test functions.

 

TestNG function signature added below -

 

@Parameters({"PROC_ID","PATIENT_NAME"})
test
public void test1(String PROC_ID , String PATIENT_NAME) {
                    System.out.println("Parameter 1 -  " +PROC_ID );

                    System.out.println("Parameter 2 -  " +PATIENT_NAME );
}

3 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    According to my knowledge, TestComplete does not execute TestNG tests but spawns execution to the corresponding native runtime engine. This means that you should use the same approach that you are using when running your tests using TestNG.

    • JeevakCC's avatar
      JeevakCC
      Occasional Contributor

      I have done integration TC with Winium TestNG . Property file used to write parameters from TC and Winium TestNG will read that parameters .

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        Yes, this is the way that should work. Thank you for the update.