** Settings ***

Library          Telnet
Library          HttpLibrary.HTTP
Library          Process
Library          OperatingSystem

Resource         Server_lib.txt

Suite Setup      Initialize Emergent    ./chapter_4/pat_assoc.proj
Suite Teardown   Shutdown Emergent

*** Variables ***

# use 'pybot -v debug:true server.txt' on the command line to
#      output the transmissions to/from Emergent using warnings
${debug} =       false

*** Test Cases ***

# Ideas on things to test
#  - SetDataTableCell and Matrix Cell

#
# Initialization and general tests
#

Initialize
    Set Suite Variable     ${verbose}       ${false}
    Set Suite Variable     ${project}       ./chapter_4/pat_assoc.proj
    Run Keyword If         '${debug}' == 'true'       Set Suite Variable   ${verbose}  ${true}

Connection
    Sleep                  1 sec
    ${output} =            Read
    Print                  ${output}
    Should Contain         ${output}    Emergent Server v8.

# TODO: Start another process and check for the "Too many connections already" error.

#
# ParserTest
#

General RunState
    ${output} =                Run Command Wait      {"command": "GetRunState"}
    Status OK Match Result     ${output}             4


Rows till learning
    
    Run Emergent Program	LeabraBatch

    DataTable Rows Should Be Less Than		.data.gp[\\\"OutputData\\\"][\\\"EpochOutputData\\\"]  150  Number of rows in EpochOutputData

    

*** Keywords ***