Menu

Is there still someone here ?

Help
2011-05-26
2013-04-25
  • Daanen Vincent

    Daanen Vincent - 2011-05-26

    Hi,

    I discover QAT recently and I have some questions.

    Is there still someone here to help me ?

    Thanks

    V

     
  • Web Hiker

    Web Hiker - 2011-05-26

    yes, what's up?

     
  • Daanen Vincent

    Daanen Vincent - 2011-05-27

    Hi,

    where can I find information about the qaxml language. It seems to be close to ant.
    In fact, i would like to use antremote/antserver, how can I do this ?

    And also, how can I start an external executable to perform an action ?

    thanks

    V

     
  • Daanen Vincent

    Daanen Vincent - 2011-05-27

    Hi

    thanks for your answer..I will have a look.

    I have another question : I'm trying to use antserver/antremote with QAT. I can use this from console so I knwo it works on my computer.

    The qash script follows:

    #################################################
    # @(#)file    test.qash
    # @(#)author  V.DAANEN
    # @(#)version 1.0
    # @(#)date    2011.05.27
    #################################################
    ###############################################################
    # Set up details for this test
    ###############################################################
    qat.test.name="Test"
    qat.test.author="V.DAANEN"
    qat.test.description="NA"
    qat.test.buginfo=""
    qat.test.keywords="-"
    PRINT "Debut"
    #SETPROP(AGENT_ID, "Path","\"C:\Program Files\Java\jdk1.6.0_25\bin\";d:\Outils\apache-ant-1.8.2\bin") 
    SETAGENT(AGENT_ID,agent1.name, agent1.port , ".")
    PRINT "AGENT:"+agent1.name+" PORT="+agent1.port
    CMDSTART(AGENT_ID, cmd_id, "cmd.exe ant.bat -f \"D:\USERS\DAANEN\PROJETS\ZZ - Trials\Automatisation Tests\Script\AntRemote\build_remoteant.xml\" exec.storescu.on.remote.ant.server")
    SLEPP(10)
    CMDSTOP(cmd_id, cmd_status)
    PRINT "Cmd Status="+cmd_status
    DELAGENT(AGENT_ID)
    REPORTSTATUS(cmd_status)
    

    This script is correctly parsed by execution fails with cmd_status=1. and there is no comment in the agent console.
    Should this work ?

    Thanks for your help

     
  • Web Hiker

    Web Hiker - 2011-05-27

    Try execute ant directly, instead of calling cmd.exe ant.bat.
    Also, you should use forward slashes instead of back slashes.

     
  • Daanen Vincent

    Daanen Vincent - 2011-05-30

    Hi,

    what is the syntax for the EXECUTE command ?

    I tried 

    EXECUTE(AGENT_ID, cmd_id, "ant -f \"D:/USERS/DAANEN/PROJETS/ZZ - Trials/Automatisation Tests/Script/AntRemote/build_remoteant.xml\" exec.storescu.on.remote.ant.server")
    

    I do not received parsing error but no command is send to the ant server.

    I also had a look in the code but could not find the command execute in QASH. Is it a QAXML command? (did not find in qaxml parser source code either)

    Vince

     
  • Web Hiker

    Web Hiker - 2011-05-30

    You need to provide full path to "ant" like "d:/ant/ant.bat …"

    Also I'm not sure where you got the EXECUTE command, you should rather use CMDSTART :

    http://qat.sourceforge.net/documentation/QASHSyntax.html#CMDSTART

     
  • Daanen Vincent

    Daanen Vincent - 2011-05-30

    Hi Webhiker,

    in the documentation of the CMDSTART command, it is written
    _CMD_STRING - the command to be executed on the agent (must be relative to the agent's OS and architecture) _

    what does _must be relative to the agent's OS and architecture _ means actually ?

    I have tried using a directory structure without spaces in filename nor directories but I still got "1" as output for cmd.

     
  • Daanen Vincent

    Daanen Vincent - 2011-05-30

    I tried to execute a binary in the path and it works !
    The problem seems to be due to the fact i want to execute a batch file…

    V

     
  • Web Hiker

    Web Hiker - 2011-05-30

    You need to call CMDGETTRACE to see the output of the command you executed.

    the "relative to the agent" means the path must be valid for the computer which is running the agent.
    so if the agent is on linux, it will be a full linux path, but on windows, it will expect a windows path structure.

    I suggest taking the samples as a starting point, and extending with your own tests.

     
  • Web Hiker

    Web Hiker - 2011-05-30

    Good point, I seem to remember something like this. So if you want to run Ant, you'll need to have as the command something like "c:/command/CMD.com /C c:/ant/ant.bat…."

     
  • Daanen Vincent

    Daanen Vincent - 2011-05-31

    I made another test : just execute cmd.exe and I got this output

    [ The command cmd_id exited normally ] 
    Cmd Status=1 
    [ Processing AUTOCLEAN of 0 agent(s) ]
    

    Although the command exited normally, the return code is '1' and thus QAT interprets the test as "failed" !

    Also, where can I find explanations for the cmd Status return code ? Making trials, I can get different return code (1,-6) but i can give them a meaning :(

    V

     
  • Web Hiker

    Web Hiker - 2011-05-31

    "STATUS_CODE - the process exit value will be placed in this variable. It may not exist prior to this call. A value of 0 indicates success, any other value indicates the process exited abnormally."

    You need to call CMDGETTRACE to find out what the actual error is, or enable debug on the agent and watch it's output

     

Log in to post a comment.