How to Use RobotFramework-sshlibrary-Execute/Start Command

甲、主要的差別在於取得輸出

Excute Command 取得輸出的方式:

1
${stdout} =  Execute Command  sh /home/${USERNAME}/${ALOHA RBT FILE}/${TEST SCRIPT NAME}

Start Command取得輸出的方式:

1
2
Start Command  sh /home/${USERNAME}/${ALOHA RBT FILE}/${TEST SCRIPT NAME}
${stdout} =  Read Command Output

乙、輸出又可以分成三種:

  1. stdout ,這個也是default值

  2. stderr

  3. both

丙、輸出要怎麼設定呢?

以Excute Command為例

  1. stdout 就跟上面一樣

  2. stderr

1
${stderr} =  Execute Command  sh /home/${USERNAME}/${ALOHA RBT FILE}/${TEST SCRIPT NAME}  stderr
  1. both
1
${stdout}  ${stderr} =  Execute Command  sh /home/${USERNAME}/${ALOHA RBT FILE}/${TEST SCRIPT NAME}  Both
Comments

Comments

Google Analytics Alternative