Forum Discussion

Adam2696's avatar
Adam2696
Occasional Contributor
4 months ago

How to call/get a keyword test ID in Testcomplete?

I am uploading file A from keyword test (UPLOADFILE_A) from Testcomplete to our site. After file is uploaded in our site, it takes 20/30 mins on our end to process the file and after the file is processed I want to let know TestComplete to upload file B. How can I call Testcomplete and let it know to run the Keyword test (UPLOADFILE_B) that uploads File B.

Need help, thanks

  • We have   a similar requirement in our tests with  validations on 1 or more delayed events.  We do it similar to the  way  AlexKaras said and run a number of  creation tests,  run some other   tests then at the end of the tests run the corresponding validations.  TestComplete unfortunately  does not  have table  dynamic variables otherwise you'd be able to maintain a table to maintain  the  states of the different  tests.  For another  system we have a two delays of 10 minutes which  we had reduced   to 5.  Even then its inefficient.   

    Another way we do it  is to create a bunch of things and update  spreadsheet with their unique  IDs, validation status, date-time etc. Then when the test runs it first checks the spreadsheet for past untested items then validates them updating  the spreadsheet logging errors in the testlog.  At  the  end it  creates more items for future tests that  will run next time around.  We have 2 stages of delays so that process run again to  see if the 1st stage has passed, test the  2nd stage and update  the spreadsheet.  For  DevOps  tests we can email the spreadsheet if needed.

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    While reply from rraghvani is correct and can be used for your case, the case itself rises a couple of questions.
    Is it really necessary to wait until the file is processed? Will your actual user wait for this? Is it possible to upload several files and check later if all of them were processed? Can your file or backend business logic be modified/simplified to make the (specially marked test) file to be processed immediately?

     

    If nothing from above is not an option, remember that parallel tests execution is not supported in TestComplete. This means that your test and the whole test box will effectively be blocked for 30 mins while waiting for 'Completed' to appear.

    You and your developers may consider to issue some event when file processing is over and let TC know about this - https://support.smartbear.com/testcomplete/docs/testing-with/advanced/handling-events/creating-handlers/for-external-com-objects.html for more details.

     

    • Marsha_R's avatar
      Marsha_R
      Moderator

      AlexKaras has the right idea.  I'm wondering what you are actually testing? 

      If you are testing the download to make sure it will handle large files, do this once and not every time you run the test. There's no need to retest with a large file unless the download function actually changes. Put a small file in for everyday use.

      If you are putting those files out for a following test to use, consider just putting the files out and leaving them where they need to be while you are testing. Update them manually if you need to.

      What scenario are you actually testing with this?

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    How would you do the scenario that you have described, manually?

    • Adam2696's avatar
      Adam2696
      Occasional Contributor

      Upload File A to our site

      Then backend finishes uploading file A and says Complete

      And I am looking for something to tell Test Complete that File A is complete now, run the File B upload keyword test.

      Does that help?

       

      • rraghvani's avatar
        rraghvani
        Champion Level 3

        Delay your keyword test until "Complete" appears, then proceed to the next upload