Forum Discussion

wnull3's avatar
wnull3
Occasional Contributor
9 years ago

playback now does entire project instead of single function

I'm testing an internal company website using scripts (Javascript).  Everything has been going well but all of a sudden when I try to playback a single test, Test Complete is playing back the entire project.

 

For instance I'm trying to playback a single function.  I select the function and hit the playback button and it starts playing back the entire project.  

 

I tried right clicking and using the 'Run current routine' but it still kicks off a project playback.

 

Did I alter a setting somehow with out realizing it (accidental hot key)?

  • Ok so got the solution from the Ticket.  

     

    Rookie Scripting mistake/friday thinking about the weekend maybe??

     

    I had the following in my common functions script

     

    exports.SPLogin = SPLogin();

     

    it should've been

     

    module.exports.SPLogin = SPLogin():

     

     

    thanks everyone for the help!

  • Would you post a screenshot or video of what you're doing to run the function?

    • wnull3's avatar
      wnull3
      Occasional Contributor

      Capture.png shows highlighting a function, right clicking and then selecting the run current routine

       

      Capture1.PNG shows selecting a function from the options

       

      Capture2PNG shows pressing the play button with the selected function from the dropdown.

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        OK... Do you have an OnStartTest event handler defined?

        If so, what script routine or keyword test is it pointing to?

         

        It's possible that, somehow, you have that handler pointing to whatever main routine executes your entire project. When you run even the "Run current routine" option, it fires the OnStartTest event handler so that COULD be what's going on.

  • Bobik's avatar
    Bobik
    Frequent Contributor

    What do you mean under "Test Complete is playing back the entire project". What is your whole project? Could you make a screenshot of you project test items?

    • bbi's avatar
      bbi
      Contributor

      Does you try to run your script routine from the Project Explorer tree ?

      - Select the wanted script in Project Suite tree

      - Right-click on it

      - Highlight the Run menu item and unfold its sub-items

      - Click on the desired routin to play

       

      Is it playing all Project Suite also with this method ?

       

       

       

       

      • wnull3's avatar
        wnull3
        Occasional Contributor

        Yes even doing it the way you describes kicks off the project run.