ricardo milheiro
unread,Dec 13, 2010, 12:25:21 PM12/13/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to robotframework-ant-users
Hello,
I've been trying to use ANT with ROBOT and i've not been able to.
The robot script is a .txt , which is called by a .bat file which
contains no more than "pybot sample.txt". Running only the bat file ,
the tests in robot , without using ANT run well.
When i try to run the same from ANT (the code from the ANT script -
build.xml - is ):
-------------------
build.xml----------------------------------------------------------
<project name="test" default="start">
<!-- Optional tasks -->
<taskdef name="robotant"
classname="org.lcx.robotframework.ant.RobotAnt" classpath="ant-
robotframework-0.1.jar" />
<target name="start"
description="START ROBOT TEST" >
<robotant
jar="robotframework-2.5.4.1.jar"
data_sources="sample.txt"
>
</robotant>
</target>
</project>
--------------------------------------------------------------------
--- sample.txt ---------------------------
-----------------------------------------------------------------------
***Settings***
Library AutoItLibrary
Library tnmscLib
***Test Cases***
Happy Count
Double Count
Double Count
clear_counter2
Launch Core
${obj} = StartTNMSCClient
Set Suite Variable ${obj}
Show Network Subview
showNetworkView ${obj}
Set to Edit TAB
viewEditTAB
Create NE Container
Run Keyword And Ignore Error createNEContainer ${obj} MSI1 ""
"" "" "" C:\\WINDOWS\\temp\\save1.txt
Create NE Container
Run Keyword And Ignore Error createNEContainer ${obj} MSI2 ""
"" "" "" C:\\WINDOWS\\temp\\save1.txt
Run Keyword And Ignore Error createNEContainer ${obj} MSI3 ""
"" "" "" C:\\WINDOWS\\temp\\save1.txt
Run Keyword And Ignore Error createNEContainer ${obj} MSI2 ""
"" "" "" C:\\WINDOWS\\temp\\save1.txt
Run Keyword And Ignore Error createNEContainer ${obj} MSI5 ""
"" "" "" C:\\WINDOWS\\temp\\save1.txt
Modify NE Container
Run Keyword And Ignore Error ModifyNEContainer ${obj} MSI1 line2
"" "" "" C:\\WINDOWS\\temp\\save1.txt
Run Keyword And Ignore Error ModifyNEContainer ${obj} MSI2 line2
"" "" "" C:\\WINDOWS\\temp\\save1.txt
Delete NE Container
Run Keyword And Ignore Error DeleteNEContainer ${obj} MSI1 C:\
\WINDOWS\\temp\\save1.txt
Run Keyword And Ignore Error DeleteNEContainer ${obj} MSI2 C:\
\WINDOWS\\temp\\save1.txt
Run Keyword And Ignore Error DeleteNEContainer ${obj} MSI3 C:\
\WINDOWS\\temp\\save1.txt
Run Keyword And Ignore Error DeleteNEContainer ${obj} MSI4 C:\
\WINDOWS\\temp\\save1.txt
Run Keyword And Ignore Error DeleteNEContainer ${obj} MSI5 C:\
\WINDOWS\\temp\\save1.txt
***Keywords***
Double Count
count
count
-------------------------------------------------------------------------------
To run, i type : ant
It returns a lot of errors in the report log.html:
It seems that the main problems are the libraries AutoItLibrary and
tnmsclib that it cannot find , but the paths of those libraries are in
PITHONPATH.
start:
[robotant] [ ERROR ] Invalid syntax in file 'd:\subversion
\tnms_automation\core
\test1\sample.txt' in table 'Settings': Importing test library
'AutoItLibrary' f
ailed: ImportError: No module named AutoItLibrary
[robotant] PYTHONPATH: ['D:\\subversion\\TNMS_AUTOMATION\\CORE\\test1\
\robotfra
mework-2.5.4.1.jar\\Lib\\robot\\libraries', 'D:\\subversion\
\TNMS_AUTOMATION\\CO
RE\\test1\\Lib', 'D:\\subversion\\TNMS_AUTOMATION\\CORE\\test1\
\robotframework-2
.5.4.1.jar\\Lib', '__classpath__', '__pyclasspath__/', 'D:\\subversion\
\TNMS_AUT
OMATION\\CORE\\corelib', 'C:\\Python26\\Lib\\site-packages\
\AutoItLibrary', '.']
[robotant] CLASSPATH: D:\subversion\TNMS_AUTOMATION\CORE
\test1\robotframework-2
.5.4.1.jar
[robotant] Traceback (most recent call last):
[robotant] File "D:\subversion\TNMS_AUTOMATION\CORE
\test1\robotframework-2.5.
4.1.jar\Lib\robot\utils\importing$py.class", line 94, in _import
[robotant] [ ERROR ] Invalid syntax in file 'd:\subversion
\tnms_automation\core
\test1\sample.txt' in table 'Settings': Importing test library
'tnmscLib' failed
: ImportError: No module named win32com
[robotant] PYTHONPATH: ['D:\\subversion\\TNMS_AUTOMATION\\CORE\\test1\
\robotfra
mework-2.5.4.1.jar\\Lib\\robot\\libraries', 'D:\\subversion\
\TNMS_AUTOMATION\\CO
RE\\test1\\Lib', 'D:\\subversion\\TNMS_AUTOMATION\\CORE\\test1\
\robotframework-2
.5.4.1.jar\\Lib', '__classpath__', '__pyclasspath__/', 'D:\\subversion\
\TNMS_AUT
OMATION\\CORE\\corelib', 'C:\\Python26\\Lib\\site-packages\
\AutoItLibrary', '.']