Your e-Business Quality Partner eValid™ -- The Web Quality Suite
Browser-Based Client-Side Functional Testing and Validation Page Timing/Tuning Transaction Monitoring. WebSite Spidering & Analysis and Realistic Server Loading.
© Copyright 2000-2011 by Software Research, Inc.

eValid -- Power User Tips & Tricks
Prior   |   Catalog   |   eValid Home   |   Search   |   Next

Become an eValid Power User!
eValid Power User's Tips and Tricks can help you use eValid to get better results, quicker, and easier. Each Tips and Tricks item addresss one or two issues that will help you to increase your effectiveness with eValid.

> Determining eValid Error Codes from the Command Line (in PERL)

  When running eValid from the command line, an important aspect of
  the eValid playback is to be able to read the result of the
  playback through the error codes issued by eValid. This is
  especially important because these values allow other tools to be
  able to interact and perform a set of actions with eValid based on
  the erro code that was issued.

  Because one of the more common languages used to integrate Web
  scripting and control with eValid operation is PERL, we will
  describe the recover of Error Codes using PERL script examples.

  Below is an example of a sample script we have set up to
  extracts the return code generated from eValid and prints the
  output to the screen.

> PERL Example:

    # Example PERL script to extract return code from eValid playback
    #-------------------------------------------------------------------
    # Call eValid in batch mode to play back "script.evs"...
            @testA=("evalid -b script.evs");
    #
    # Then call the playback function (defined above) to print out
    # the error codes...
            testPERL();
    #-------------------------------------------------------------------
    # Function "testPERL" recovers the actual error code values...
    sub testPERL()
        {
            print "\nRunning PERL Script!!!\n";
    #
    # Initialize the error code value...
            $errorCode=0;
            print "\nCheck reset errorCode = ", $errorCode, "\n";
    #
    # Recover the error codes from the result stored in @testA...
            $errorCode=system(@testA);
    #
    # Print return code after eValid runs, and right-shift it one byte...
            $Decimal = 256;
            print "\n\nError= ", $errorCode/$Decimal, "\n\n";
        }
    #-------------------------------------------------------------------
    # End of example PERL script.

> Confirmation Note:

  This PERL script was confirmed using ActivePERL 5.8.0.805 on a
  Windows 2000 machine.  We expect, but don't guarantee, that this
  PERL script will work on your own environment.