Forum Discussion

larebshaikh's avatar
larebshaikh
Occasional Contributor
2 years ago

Is there any inbuilt event in testcomplete for project start and project stop

Hello Team,

I am trying to export logs for each sub project in project suite once the execution is completed. I am unable to find any event to handle this scenario .is there any inbuilt event to achieve this?

Like onprojectstop or something

Thanks

11 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I also couldn't find anything similar to that - I've defined my execution plans like so,

    Main and Cleanup are not test cases. Main performs the database setup, launching of browser etc, and Cleanup removes inserted records, files etc.

     

  • Hi,

     

    I've found a workaround which consists in determining whether I'm on the first or last test run of the project (which isn't easy, since you still have to test whether each test is active or not...).

     

    Once the hard part is done, all that's left to do is :
    1- Test whether we're on the first test in the OnStartTest() event to initialize the project
    2 - Test whether we're on the last test in the OnStopTest() event to finalize the project.

     

    But I agree with you, I don't really understand why the following native events aren't available, especially as I don't suppose it should be very complicated to implement on their side (probably less than what I've done to get the same result)
    - OnStartProject() / OnStopProject()

    - OnStartProjectSuite() / OnStopProjectSuite()

     

    I've found a link to the evolution proposal, but few people voted for it (hence why it hasn't been implemented yet...) : new idea for project test events 

     

    Regards

     
    • larebshaikh's avatar
      larebshaikh
      Occasional Contributor

      Thanks for reply lherry .

      I am wondering, How can a Automation testing tool providing company not impliment something which is necessary/useful for most of automation cases.

      In shared post I saw someone's comment who asked user to manually create login for this. Sigh!

  • Kitt's avatar
    Kitt
    Regular Contributor

    OnStartTest() and OnStopTest() - see [here]. Just need to write your own steps of what you want to occur.

    • larebshaikh's avatar
      larebshaikh
      Occasional Contributor
      Hello kitt,


      I tried using onstoptest and onstarttest but I observed that script is being executed before and after each scripts I want to execute my requirement at the start of execution and after all testcases executed in the end of execution.
  • larebshaikh's avatar
    larebshaikh
    Occasional Contributor

    I am also implementing similar solution but wanted to check if testcomplete provides anything internallly.


    • AlexKaras's avatar
      AlexKaras
      Champion Level 3

      Hi,

       

      Alas, nothing like that... 😞

      Feature request exists (don't have the link at hand), but has not been implemented yet. 😞

       

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Do you want to export log results once your project suite/project has completed?

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Ok. Refer to MW_Didata reference, as I've provided examples of output log and results that I've setup and use.