Using Replayer

Version 8

    Replayer can be used to play back Tableau Server single or multi-user sessions.

     

    In this section

    • What you need to run Replayer
    • Replayer workflow
    • Identifying traffic on Tableau server to replay
    • Generate the Tableau Server archive (logs.zip)
    • Run Logshark with the Replayer plugin to extract the replay data from the logs
    • Configure Replayer
    • Run Replayer and select the server session to replay
    • Use the Debug options to pause and step through a Replayer playback session during browser replay
    • Run Replayer from the command line for load testing and capacity planning
    • Replay.Playback command options

    What you need to run Replayer

    You need the following:

    • Access to the Tableau server with workbooks, viz and  data sources, extracts for the session you plan to record and playback
    • Ensure you have 64-bit Java installed on the computer you plan to run the Replay tool from. To install Java go to: http://java.com/en/download/
    • Replay and associated tools.
      • Copy Latest replay tool directory to your computer, follow the instructions for setting up and copying the binaries Replayer Installation guide:
        This directory includes everything you need to run Replayer, including Logshark and the ReplayCreation support files.

    Replayer workflow

    • Identify the traffic on Tableau Server session that you wish to replay.
    • Generate the Tableau Server archive file (zipped logs).
    • Run Logshark with the Replayer plug-in to extract the replay data from the logs and create replay json file.
    • Load the replay file in Replayer, filter the traffic as needed, and then run Replayer.

    Generate the Tableau Server archive (logs.zip)

    Create the log files. From a Command Prompt, use the tabadmin ziplogs command, or use the Status page on Tableau Server to create the Snapshot or archive zipped file (logs.zip). Zip file contain logs from all Tableau processes, Replay tool needs Apache and vizlqserver logs to  reproduce the issue and debug it.

    Identifying traffic on Tableau server to Replay

    Depending on what the goal is identify the traffic that you want to replay. For example, you want to know how your peak traffic performed in a different setting or different load. This information can also be used to filter the traffic from the Replay file generated using Logshark to get to interesting part of the traffic.

    Run Logshark with the Replayer plugin to extract the replay data from the logs

    Logshark unzips and processes the log files and runs ReplayCreation plugin along with other plugins used for analysis, ReplayCreation plugin creates a JSON file. The JSON file is used as input to the Replayer tool. Logshark creates this file in the "output" directory under the working directory.

    • Go to the Replayer directory and run Logshark on the Tableau Server archive (zipped) file you generated in the previous step.

             C:\Replay>logshark.exe logs.zip --plugins ReplayCreation

    By default, Logshark uses network hosted databases to store the results from parsing and processing the log files. If you only want to prepare the Replay playback file, you can eliminate those dependencies by specifying that you want to use a local MongoDB database (--startlocalmongo) and that you only want to process the Replay plugin (--plugins ReplayCreation).

    C:\Replay>logshark.exe logs.zip --startlocalmongo --plugins ReplayCreation

    • Replay file get generated in output folder with the default name Playback_<day>_<month>-<year>-<hr>-<min>-<secs>.JSON.

     

    The Replayer directory contains includes a copy of Logshark. You should run Logshark from this directory so that it finds the ReplayCreation plugin and support files.

    If you install Logshark separately, the ReplayCreation plugin is not currently included in that package. The installation program also places Logshark in a different location and sets up the PATH environment. If you run the Logshark in another directory, it will not find the necessary plugin or support files for the Replay tool.

     

    Configure Replay

    You need to supply the login credentials for Tableau Server. If you are often logging on to the same Tableau Server or you want  provide a default settings, you can specify these in the ReplayLogConfig.yaml file. You can also provide the user name and password in the Auth tab after you launch Replay. The user name and password you provide in the Auth tab override the settings in the ReplayLogConfig.yaml file. If the login authentication fails, Tableau Server will prompt you for the information.

    1. Open the ReplayLogConfig.yaml file (you can make a copy of the original).
    2. Change the user and pass fields with the login credentials for your Tableau Server.
    ReplayLogConfig.yaml

    #---------------------------------------------------------------------------

    # Configuration file for server test suite

    #---------------------------------------------------------------------------

    default {

     

      # chrome driver location

      chromeDriverLocation: dependencies

      chromeDriverName: chromedriver.exe

     

      user : myAdmin

      pass : Password

    }

     

    Running Replayer uisng the UI

    1. Open a Command Prompt window and go to the Replayer directory.
    2. Enter the following command to start the Replayer application which runs java -Dfile.encoding=UTF-8 -cp * com.tableausoftware.test.tools.Replay.ReplayRunner.
    3. In the Replayer application, click Playback File to select the replay file you created with Logshark (The default name is Playback_<day>_<month>-<year>-<hr>-<min>-<secs>.JSON. The file is created in the Replay directory).
    4. In the Tableau Server URL text box, specify the URL of the Tableau Server you are using (for example, http://localhost).
    5. If you haven't set the Tableau Server login information in the ReplayLogConfig.yaml file, click the Auth tab and provide the user name and password. The credentials you enter in the Auth tab overwrite the login settings in the ReplayLogConfig.yaml file.
    6. When you select the playback file, information about the available Tableau Server sessions appears in the Sessions table. If you want to replay a particular session in the Sessions box, scroll through and select the session you want to replay.  Each session recorded lists the number of commands available for playback or select time interval in UTC to filter to interesting session.You can also select other options, such as which browser to use, the playback speed for the session.
    7. Click Replay to playback the session.

     

    ReplayScreenshot.png

     

    As Replayer runs, you can observe the output in the Console window. When running replay via browser Replayer uses the Selenium libraries and verifies each command and throws exceptions and warnings if something goes wrong during playback.

    When running multiple session select Non browser option, Replayer uses HTTP response code and presmodel to verify success of each step. When Replay has finished, both the GUI and the console output will indicate that replay completed.

     

    Use the Debug options to pause and step through a Replayer playback session during browser replay

    if you want finer control over the session, you can use the Debug options to playback the session. Using the Debug options, you can run, step, and pause a replay session

    debugpane.png

     

    Run Replayer from the command line for load testing and capacity planning

    You can use the RunReplay.bat file to launch the Replay GUI application that you can then use set options and select the playback file. The *.bat file runs the Java class Replay.ReplayRunner, You can also run Replay directly, using Replay.PlayBack Java class, using command line options. This is convenient if you are interested in running multi-user (or "browserless") sessions for load testing and capacity planning. When you run Replayer with

    1. Open a Command Prompt window and go to the Replayer directory.
    2. Use the following command syntax to start the Replayer playback.

      java -Dfile.encoding=UTF-8 -cp * com.tableausoftware.test.tools.Replay.PlayBack  [Options]

      For the Replay.Playback options, you need to include the following:
      machineName=<Tableau Server>
      replayFile=
      [path]<playback>.json 
      multiuser=yes

      For example, the following command tells Replay to run a playback file with concurrent multi-user sessions on the Tableau Server called betamachine2.

            java -Dfile.encoding=UTF-8 -cp bin\*;libs\* com.tableausoftware.test.tools.Replay.PlayBack machineName=http://betamachine2 ReplayFile=d:\Replay-interaction.json multiuser=yes