ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jler...@apache.org
Subject svn commit: r886233 - in /ofbiz/trunk/framework/testtools: convertSeleniumIDE.bat convertSeleniumIDE.sh runSeleniumXml.bat runSeleniumXml.sh
Date Wed, 02 Dec 2009 18:14:40 GMT
Author: jleroux
Date: Wed Dec  2 18:14:39 2009
New Revision: 886233

URL: http://svn.apache.org/viewvc?rev=886233&view=rev
Log:
A enhanced patch from Erwan de FERRIERES "Bug when using convert selenium html tests to xml"
(https://issues.apache.org/jira/browse/OFBIZ-3282) - OFBIZ-3282
This line was causing the error : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
What Erwan done :
    * corrected the imports in the script
    * used sed to remove this line, it is now creating a temp file without the line which
is given to the converter.

I have personally modified the convertSeleniumIDE.bat file but did not test (nor Linux version,
I suppose it's ok). I guess this will mostly used on Linux Server and should work anyway.

Modified:
    ofbiz/trunk/framework/testtools/convertSeleniumIDE.bat
    ofbiz/trunk/framework/testtools/convertSeleniumIDE.sh
    ofbiz/trunk/framework/testtools/runSeleniumXml.bat
    ofbiz/trunk/framework/testtools/runSeleniumXml.sh

Modified: ofbiz/trunk/framework/testtools/convertSeleniumIDE.bat
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/convertSeleniumIDE.bat?rev=886233&r1=886232&r2=886233&view=diff
==============================================================================
--- ofbiz/trunk/framework/testtools/convertSeleniumIDE.bat (original)
+++ ofbiz/trunk/framework/testtools/convertSeleniumIDE.bat Wed Dec  2 18:14:39 2009
@@ -1,7 +1,8 @@
 set OFBIZ_HOME=../..
 set CP=./build/lib/ofbiz-testtools.jar
-set CP=%CP%;./lib/httpclient-4.0-beta1.jar
 set CP=%CP%;./lib/selenium-java-client-driver.jar
+set CP=%CP%;%OFBIZ_HOME%/framework/base/build/lib/ofbiz-base.jar
+set CP=%CP%;%OFBIZ_HOME%/framework/base/lib/httpclient-4.0.jar
 set CP=%CP%;%OFBIZ_HOME%/framework/base/lib/jdom-1.1.jar
 set CP=%CP%;%OFBIZ_HOME%/framework/base/lib/scripting/jython-nooro.jar
 set CP=%CP%;%OFBIZ_HOME%/framework/base/lib/junit.jar
@@ -13,4 +14,10 @@
 rem For Example:
 rem convertSeleniumIDE.bat <recorded_script> <converted_script>
 
-"%JAVA_HOME%/bin/java.exe" -cp %CP% org.ofbiz.testtools.seleniumxml.SeleniumIDEConverter
%1 %2
+rem following commands needs MkTemp for Windows (http://gnuwin32.sourceforge.net/packages/mktemp.htm)
+rem and Sed for Windows (http://gnuwin32.sourceforge.net/packages/sed.htm) to work
+tempFile=`mktemp tempFileXXX.html` 
+sed '2d' %1 > $tempFile
+rem BEware the following command is provided for convenience and remains untestet
+"%JAVA_HOME%/bin/java.exe" -cp %CP% org.ofbiz.testtools.seleniumxml.SeleniumIDEConverter
"%tempFile%" %2
+del "%tempFile%"
\ No newline at end of file

Modified: ofbiz/trunk/framework/testtools/convertSeleniumIDE.sh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/convertSeleniumIDE.sh?rev=886233&r1=886232&r2=886233&view=diff
==============================================================================
--- ofbiz/trunk/framework/testtools/convertSeleniumIDE.sh (original)
+++ ofbiz/trunk/framework/testtools/convertSeleniumIDE.sh Wed Dec  2 18:14:39 2009
@@ -1,8 +1,9 @@
 #!/bin/sh
 export OFBIZ_HOME=../..
 export CP=./build/lib/ofbiz-testtools.jar
-export CP=$CP:./lib/httpclient-4.0-beta1.jar
 export CP=$CP:./lib/selenium-java-client-driver.jar
+export CP=$CP:$OFBIZ_HOME/framework/base/build/lib/ofbiz-base.jar
+export CP=$CP:$OFBIZ_HOME/framework/base/lib/httpclient-4.0.jar
 export CP=$CP:$OFBIZ_HOME/framework/base/lib/jdom-1.1.jar
 export CP=$CP:$OFBIZ_HOME/framework/base/lib/scripting/jython-nooro.jar
 export CP=$CP:$OFBIZ_HOME/framework/base/lib/junit.jar
@@ -20,5 +21,9 @@
   JAVA=java
 fi
 
-"$JAVA" -cp $CP org.ofbiz.testtools.seleniumxml.SeleniumIDEConverter "$@"
+tempFile=`mktemp tempFileXXX.html` 
+sed '2d' $1 > $tempFile
+
+"$JAVA" -cp $CP org.ofbiz.testtools.seleniumxml.SeleniumIDEConverter "$tempFile" "$2"
+rm $tempFile
 exit 0

Modified: ofbiz/trunk/framework/testtools/runSeleniumXml.bat
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/runSeleniumXml.bat?rev=886233&r1=886232&r2=886233&view=diff
==============================================================================
--- ofbiz/trunk/framework/testtools/runSeleniumXml.bat (original)
+++ ofbiz/trunk/framework/testtools/runSeleniumXml.bat Wed Dec  2 18:14:39 2009
@@ -1,8 +1,8 @@
 rem set JAVA_HOME=%JDK_15%
 set OFBIZ_HOME=../..
 set CP=./build/lib/ofbiz-testtools.jar
-set CP=%CP%;./lib/httpclient-4.0-beta1.jar
 set CP=%CP%;./lib/selenium-java-client-driver.jar
+set CP=%CP%;%OFBIZ_HOME%/framework/base/lib/httpclient-4.0.jar
 set CP=%CP%;%OFBIZ_HOME%/framework/base/lib/jdom-1.1.jar
 set CP=%CP%;%OFBIZ_HOME%/framework/base/lib/scripting/jython-nooro.jar
 set CP=%CP%;%OFBIZ_HOME%/framework/base/lib/junit.jar

Modified: ofbiz/trunk/framework/testtools/runSeleniumXml.sh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/runSeleniumXml.sh?rev=886233&r1=886232&r2=886233&view=diff
==============================================================================
--- ofbiz/trunk/framework/testtools/runSeleniumXml.sh (original)
+++ ofbiz/trunk/framework/testtools/runSeleniumXml.sh Wed Dec  2 18:14:39 2009
@@ -1,9 +1,9 @@
 #!/bin/sh
-# export JAVA_HOME=$JDK_15
+
 export OFBIZ_HOME=../..
 export CP=./build/lib/ofbiz-testtools.jar
-export CP=$CP:./lib/httpclient-4.0-beta1.jar
 export CP=$CP:./lib/selenium-java-client-driver.jar
+export CP=$CP:$OFBIZ_HOME/framework/base/lib/httpclient-4.0.jar
 export CP=$CP:$OFBIZ_HOME/framework/base/lib/jdom-1.1.jar
 export CP=$CP:$OFBIZ_HOME/framework/base/lib/scripting/jython-nooro.jar
 export CP=$CP:$OFBIZ_HOME/framework/base/lib/junit.jar



Mime
View raw message