Forum Discussion

martin_facchini's avatar
martin_facchini
Contributor
11 years ago
Solved

is there anyway to NOT log a test?

have a preliminary keyword script to shut down any opened apps before the main test sequence begins.  is there any way to NOT log these results?

  • Ryan_Moran's avatar
    Ryan_Moran
    11 years ago
    function Terminate_AuthManager()
    {
    /*
      disable log
    */
      Log.Enabled = false;
    
    /*
      terminate process  
    */
      Sys.Process("PixelAuthorizeManager").Terminate();
    
    /*
      enable log
    */
      Log.Enabled = true;
    }

     

8 Replies

    • martin_facchini's avatar
      martin_facchini
      Contributor

      Hi, Marsha.  My programing knowledge is very limitetd, and the examples in the article (see directly below) doesn't give me an example of how to apply it directly. 

       

      function LockEvents()
      {
        // Disables posting events
        Log.LockEvents();
        
          // No event messages are posted to the test log
          Log.Event("This message won't be posted to the test log.");
        
        // Enables posting events
        Log.UnlockEvents();
        
        // Event messages are posted to the test log
        Log.Event("A test event message.");
      }

       

       

      Any chance you can show me an example applied to an actual case?  Very basically, I'm trying to do the following:

       

      function terminate_authmanager()
      {
        LockEvents(Sys.Process("PixelAuthorizeManager").Terminate());
      }

      where I don't want this logged.

       

      PS  Been playing around, where i've tried breaking out the functions into seperate line statements, including putting the Log.LockEvents() statement before and after the process I don't want logged, but I'm still seeing this being logged.

       

      function Terminate_AuthManager()
      {

        Log.LockEvents();
          Sys.Process("PixelAuthorizeManager").Terminate();
          Log.LockEvents();
      }

      • Ryan_Moran's avatar
        Ryan_Moran
        Valued Contributor
        function Terminate_AuthManager()
        {
        /*
          disable log
        */
          Log.Enabled = false;
        
        /*
          terminate process  
        */
          Sys.Process("PixelAuthorizeManager").Terminate();
        
        /*
          enable log
        */
          Log.Enabled = true;
        }