Using the command line test runner

Asked by Matthew Balvanz

I am experimenting with the new command line unit test runner in version 0.10.2 and I am wondering how the test outputs the results that you normally see in the unit test panel of the IDE? It does not look like it logs to stdout nor have I found a log file anywhere.

Is there a way to output those assertion and other errors to a file or stdout?

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Tsung-Hsiang Chang (vgod) said :
#1

The new Sikuli-IDE.bat is broken for running Sikuli under Windows command line. Please use this updated bat instead, http://launchpad.net/sikuli/trunk/0.10.2/+download/Sikuli-IDE.bat.
The log and outputs should be seen in stderr and stdout.

Revision history for this message
P (pgerstmann) said :
#2

With the batch fix above in place, here is a quick ant script that is now working for me on Windows to call groups of sikuli test scripts (e.g. that exercise a user flow):

<?xml version="1.0"?>

<project name="User Flow Automation" default="-usage" basedir=".">

 <macrodef name="sikuli-test">
  <attribute name="file" default="NULL"/>
  <sequential>
   <echo message="running test script '@{file}'"/>
   <exec executable="cmd" failonerror="true">
    <arg value="/c" />
    <arg value="Sikuli-IDE.bat --test @{file}" />
   </exec>
  </sequential>
 </macrodef>

 <target name="-usage" description="ant &lt;target&gt;">
  <java classname="org.apache.tools.ant.Main">
   <arg value="-projecthelp" />
  </java>
  <echo message="Note: The Sikuli app directory must be in your path."/>
 </target>

 <target name="user-flow-x.xx" description="User Flow x.xx">
  <sikuli-test file="user-flow-x.xx/task01.sikuli" />
  <sikuli-test file="user-flow-x.xx/task02.sikuli" />
  <sikuli-test file="user-flow-x.xx/task03.sikuli" />
 </target>

</project>

Can you help with this problem?

Provide an answer of your own, or ask Matthew Balvanz for more information if necessary.

To post a message you must log in.