Forum Discussion

hacka87's avatar
hacka87
Contributor
6 years ago
Solved

Test Run in a suite

Hello !

 

I have an issue regarding running multiple tests in a suite.

We use XamarinForms Version 3.3

 

I know that Test Complete for instrumenting the application requires a maximum of 2.5.

Do you know if other higher versions of XamarinForms will be supported by Test Complete.

 

We manage to run tests in small groups.

If I run the entire test suite , the tests are hanging, and do not get the proper results.

 

Do you know how to fix some stability issues regarding the test suite.

i believe there is an issue on how the app is closed before each test. It remains in the background.

I have tried with TestedApps.Close() and TestedApps.TerminateAll(). if I access the specific Proces I do not have access to methods as Close. I use the Press Back until the application is minimized in the background.

 

Best Regards,

8 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    > Do you know if other higher versions of XamarinForms will be supported by Test Complete.

    Yes, I believe in this.

     

    > i believe there is an issue on how the app is closed before each test.

    Are you testing iOS or Android app?

    I think that in the former case you are out of luck.

    In the latter case you may add code that will kill tested app process. Like described here: https://stackoverflow.com/questions/3117095/stopping-an-android-app-from-console, https://stackoverflow.com/questions/17829606/android-adb-stop-application-command-like-force-stop-for-non-rooted-device/17829677.

    E.g.:

    Mobile.Device().ShellExecute("am kill <com.your.package>");

     

    • hacka87's avatar
      hacka87
      Contributor

      Are you testing iOS or Android app?

       

      Testing on both platforms.

       

      For iOS I am using TestedApps.TerminateAll()

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        > For iOS I am using TestedApps.TerminateAll()

        I am really doubting that this works as you are expecting it to do because, as far as I know, there is no way for the user to terminate the process in iOS. Only OS can do this based on its own logic.

        I'll appreciate it if you let me know that I am wrong and provide a description of how the regular, non-rooted user can terminate the process in iOS OS.

         

    • hacka87's avatar
      hacka87
      Contributor

      I used this line of code for Android

      Mobile.Device().ShellExecute("am kill com.process.name ");

      and the process is still running in the background when pressing HomeButton.

       

      Do you know if I am missing something?

      I even tried with force-stop.

       

      Regards,

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        > "am kill com.process.name "

        Just to double-check: is 'com.process.name' a real internal name of your tested application?

        Any related messages in the test log?