• : Function ereg() is deprecated in /home/kenfray7/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/kenfray7/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/kenfray7/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/kenfray7/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/kenfray7/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/kenfray7/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/kenfray7/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/kenfray7/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/kenfray7/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/kenfray7/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/kenfray7/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/kenfray7/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/kenfray7/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /home/kenfray7/public_html/includes/file.inc on line 649.

First Project Assignment

Here is the first project assignment for everyone to complete. This is intended as a group exercise to get everyone setup with the latest code. The assignment will also help everyone learn some of the basics of creating a new test with Selenium XML.

Updating to latest seleniumXml Improvements

Assuming you have already installed ofbiz from the trunk. Here is the next group task.

I need everyone to get the most updated seleniumXml code. I have applied a patch to the ofbiz trunk but the patch requires merging with the code base. To make this easier I would like everyone to do the following:

1. Down load the attached zip file which contains the lastest seleniumXml code.

2. Update your version of ofbiz to revision 818045 to match the code in the zip file.

svn update -r 818045

3. Unzip the file from step 1 on top of your ofbiz directory. It expects the parent directory to be called "ofbiz" so if you have a different directory you may have to move the files manually.

4. Now build ofbiz again:
ant

5. Now install the latest selenium-server jar file with the following steps:

- remove the existing selenium-server.jar from testtools/lib

- run: ant install-seleniumxml

This will copy the newest selenium-server.jar file to your testtools/lib directory.

6. Now start ofbiz from the command line:

startofbiz.sh or startofbiz.bat

7. Now start the selenium-server from another command window

/framework/testtools/ant run-seleniumserver

8. Now run the example seleniumXml test from another command window (you should have three windows open)

/framework/testtools/ant run-seleniumxml

The example test should bring up an instance of firefox and login to the ofbiz example. The example test runs through the following simple test cases:

- example_start.xml
- example_login.xml
- example_new.xml
- example_search.xml

If you have any problems getting this working please send me an email or post the question to the forum.

Assignment

There is a problem with the example_search test case. The search button has moved to another screen. Your assignment is to find the ID for the search button and change the example_search.xml test to use this new button. I recommend you install the firebug plugin in firefox as it is the best tool for examining web pages and debug HTML/JavaScript. Let me know if you have found a fix for the search screen.

After you have fixed the example_search test case look at creating a brand new test case for testing other features of the example application.

Brett

23 Sep21:37

Zip file of updated source code

By brettgpalmer

Please disregard the .txt extension. I had to use that extension to attach the zip file to this document. You should be able to unzip the attached file as instructed.

Brett

AttachmentSize
ofbiz_seleniumxml_fix_20090923_rev818045.zip_.txt45.35 KB
24 Sep04:34

problem with zip file uploads - resolved

By sandy

There was a restriction on type of files that can be uploaded. zip, gzip, tar are now allowed file formats.

24 Sep06:44

problem in running seleniumserver & seleniumxml

By zohaib

hi there,
I have done everything upto step 6
but ant running of seleniumserver and seleniumxml are showing me errors.
i have ant properly installed..
the errors in running seleniumxml are :
Buildfile: build.xml
init:
classes:
[javac15] Compiling 12 source files to C:\eclipse\workspace\ofbiz\framework\testtools\build\classes
[javac15] C:\eclipse\workspace\ofbiz\framework\testtools\src\org\ofbiz\testtools\ModelTestSuite.java:71: cannot find symbol
[javac15] symbol : method getGenericDelegator(java.lang.String)
[javac15] location: interface org.ofbiz.entity.GenericDelegator
[javac15] this.delegator = GenericDelegator.getGenericDelegator(this.originalDelegatorName).makeTestDelegator(this.originalDelegatorName + uniqueSuffix);
[javac15] ^
[javac15] Note: C:\eclipse\workspace\ofbiz\framework\testtools\src\org\ofbiz\testtools\seleniumxml\SeleniumXml.java uses unchecked or unsafe operations.
[javac15] Note: Recompile with -Xlint:unchecked for details.
[javac15] 1 error

and the error in installing seleniumserver are
Buildfile: build.xml
init:
prepare:
classes:
[javac15] Compiling 12 source files to C:\eclipse\workspace\ofbiz\framework\testtools\build\classes
[javac15] C:\eclipse\workspace\ofbiz\framework\testtools\src\org\ofbiz\testtools\ModelTestSuite.java:71: cannot find symbol
[javac15] symbol : method getGenericDelegator(java.lang.String)
[javac15] location: interface org.ofbiz.entity.GenericDelegator
[javac15] this.delegator = GenericDelegator.getGenericDelegator(this.originalDelegatorName).makeTestDelegator(this.originalDelegatorName + uniqueSuffix);
[javac15] ^
[javac15] Note: C:\eclipse\workspace\ofbiz\framework\testtools\src\org\ofbiz\testtools\seleniumxml\SeleniumXml.java uses unchecked or unsafe operations.
[javac15] Note: Recompile with -Xlint:unchecked for details.
[javac15] 1 error

It appears that there is error in ModelTestSuite.java

24 Sep18:39

yes me too facing same

By rashmi.singh

yes me too facing same problem

the step which i have taken is

i had replaced all the file of old ofbiz/framework from new ofbiz/framework(which i got from download)

and there is no such Zar file "selenium-server.zar" in my testtools/lib folder I found

and then i went to the path where my ofbiz setup is and run this command
R:\testing\testing_project\ofbiz-trunk>ant
r:

epare:

asses:

rc-available:

r:

epare:

asses:

rc-available:

r:

epare:

asses:
[javac15] Compiling 12 source files to R:\testing\testing_project\ofbiz-trunk\
amework\testtools\build\classes
[javac15] R:\testing\testing_project\ofbiz-trunk\framework\testtools\src\org\o
iz\testtools\VerifySeleniumSetups.java:17: package javax.servlet.http does not
xist
[javac15] import javax.servlet.http.HttpServletRequest;
[javac15] ^
[javac15] R:\testing\testing_project\ofbiz-trunk\framework\testtools\src\org\o
iz\testtools\VerifySeleniumSetups.java:18: package javax.servlet.http does not
xist
[javac15] import javax.servlet.http.HttpServletResponse;
[javac15] ^
[javac15] R:\testing\testing_project\ofbiz-trunk\framework\testtools\src\org\o
iz\testtools\VerifySeleniumSetups.java:50: cannot find symbol
[javac15] symbol : class HttpServletRequest
[javac15] location: class org.ofbiz.testtools.VerifySeleniumSetups
[javac15] public static String verifyConfig(HttpServletRequest request, Ht
ServletResponse response){
[javac15] ^
[javac15] R:\testing\testing_project\ofbiz-trunk\framework\testtools\src\org\o
iz\testtools\VerifySeleniumSetups.java:50: cannot find symbol
[javac15] symbol : class HttpServletResponse
[javac15] location: class org.ofbiz.testtools.VerifySeleniumSetups
[javac15] public static String verifyConfig(HttpServletRequest request, Ht
ServletResponse response){
[javac15] ^
[javac15] R:\testing\testing_project\ofbiz-trunk\framework\testtools\src\org\o
iz\testtools\VerifySeleniumSetups.java:97: cannot find symbol
[javac15] symbol : class HttpServletRequest
[javac15] location: class org.ofbiz.testtools.VerifySeleniumSetups
[javac15] public static void doDownload( HttpServletRequest request, Http
rvletResponse response){
[javac15] ^
[javac15] R:\testing\testing_project\ofbiz-trunk\framework\testtools\src\org\o
iz\testtools\VerifySeleniumSetups.java:97: cannot find symbol
[javac15] symbol : class HttpServletResponse
[javac15] location: class org.ofbiz.testtools.VerifySeleniumSetups
[javac15] public static void doDownload( HttpServletRequest request, Http
rvletResponse response){
[javac15] ^
[javac15] R:\testing\testing_project\ofbiz-trunk\framework\testtools\src\org\o
iz\testtools\VerifySeleniumSetups.java:143: cannot find symbol
[javac15] symbol : class HttpServletRequest
[javac15] location: class org.ofbiz.testtools.VerifySeleniumSetups
[javac15] public static String checkProgressDownloadStatus(HttpServletRequ
t request, HttpServletResponse response){
[javac15] ^
[javac15] R:\testing\testing_project\ofbiz-trunk\framework\testtools\src\org\o
iz\testtools\VerifySeleniumSetups.java:143: cannot find symbol
[javac15] symbol : class HttpServletResponse
[javac15] location: class org.ofbiz.testtools.VerifySeleniumSetups
[javac15] public static String checkProgressDownloadStatus(HttpServletRequ
t request, HttpServletResponse response){
[javac15]
^
[javac15] R:\testing\testing_project\ofbiz-trunk\framework\testtools\src\org\o
iz\testtools\VerifySeleniumSetups.java:155: cannot find symbol
[javac15] symbol : class HttpServletResponse
[javac15] location: class org.ofbiz.testtools.VerifySeleniumSetups
[javac15] public static void toJsonObject(Map attrMap, Http
rvletResponse response){
[javac15] ^
[javac15] Note: R:\testing\testing_project\ofbiz-trunk\framework\testtools\src
rg\ofbiz\testtools\seleniumxml\SeleniumXml.java uses unchecked or unsafe opera
ons.
[javac15] Note: Recompile with -Xlint:unchecked for details.
[javac15] 9 errors

ILD FAILED
\testing\testing_project\ofbiz-trunk\build.xml:154: The following error occurr
while executing this line:
\testing\testing_project\ofbiz-trunk\framework\build.xml:141: The following er
r occurred while executing this line:
\testing\testing_project\ofbiz-trunk\macros.xml:27: The following error occurr
while executing this line:
\testing\testing_project\ofbiz-trunk\framework\testtools\build.xml:62: Compile
ailed; see the compiler error output for details.

thanks and regards
Rashmi Singh
2008074
IIIT Bangalore

25 Sep13:03

Errors while doing the first assignment

By manish

Hi,
I am getting errors while doing step 4 and 5th. Following are the errors which i got while doing the same. need help on the same.

BUILD FAILED
C:\IIITB\3rdSem\SoftwareTesting\ofbiz-trunk-current\ofbiz-trunk\build.xml:154: T
he following error occurred while executing this line:
C:\IIITB\3rdSem\SoftwareTesting\ofbiz-trunk-current\ofbiz-trunk\framework\build.
xml:141: The following error occurred while executing this line:
C:\IIITB\3rdSem\SoftwareTesting\ofbiz-trunk-current\ofbiz-trunk\macros.xml:27: T
he following error occurred while executing this line:
C:\IIITB\3rdSem\SoftwareTesting\ofbiz-trunk-current\ofbiz-trunk\framework\testto
ols\build.xml:62: Compile failed; see the compiler error output for details.

Total time: ४३ seconds

C:\IIITB\3rdSem\SoftwareTesting\ofbiz-trunk-current\ofbiz-trunk\framework\testto
ols>"C:\Program Files\Java\jdk1.6.0_14/bin/java.exe" -Dselenium.config=./config/
seleniumXml.properties -cp ./build/lib/ofbiz-testtools.jar;./lib/httpclient-4.0-
beta1.jar;./lib/selenium-java-client-driver.jar;../../framework/base/lib/jdom-1.
1.jar;../../framework/base/lib/scripting/jython-nooro.jar;../../framework/base/l
ib/junit.jar;../../framework/base/lib/commons/commons-lang-2.3.jar;../../framewo
rk/base/lib/log4j-1.2.15.jar org.ofbiz.testtools.seleniumxml.SeleniumXml
Please include a path for the selenium XML test file.

Thanks and Regards,
Manish Agrawal
IIIT Bangalore

27 Sep14:16

Fix for build error

By brettgpalmer

Sorry, there is a VerifySeleniumSetups.java file that was added by the community that is requiring a j2ee library. This file isn't necessary to run our tests but I'm attaching an updated build.xml file.

The new file has the following line added:

^M

Replace the framework/testtools/build.xml with this new one and then run the build again. This should fix the compile error.

Note: I had to rename the build.xml file to build.xml.txt to post to the forum. Please rename it back to build.xml after you have downloaded it.

Brett

AttachmentSize
build.xml_.txt4.76 KB
27 Sep14:17

Here is the new line that didn't show up in my last post

By brettgpalmer

< fileset dir="../base/lib/j2eespecs" includes="*.jar"/ >

27 Sep17:50

Error while executing Step6

By Aparana_Gupta

Sir,

I was able to follow till Step 5 successfully.
On following the step 6: it gave me the following error

E:\ofbiz>startofbiz.bat

E:\ofbiz>echo off

E:\ofbiz>"C:\Program Files\Java\jdk1.6.0_07\\bin\java" -Xms128M -Xmx512M -jar of
biz.jar 1>runtime\logs\console.log
Exception in thread "main" java.lang.IncompatibleClassChangeError: Found class o
rg.ofbiz.entity.GenericDelegator, but interface was expected
at org.ofbiz.entity.model.ModelEntityChecker.checkEntities(ModelEntityCh
ecker.java:43)
at org.ofbiz.entity.GenericDelegator.(GenericDelegator.java:254)
at org.ofbiz.entity.GenericDelegator.getGenericDelegator(GenericDelegato
r.java:141)
at org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer
.java:171)
at org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoade
r.java:190)
at org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:66
)
at org.ofbiz.base.start.Start.initStartLoaders(Start.java:259)
at org.ofbiz.base.start.Start.init(Start.java:97)
at org.ofbiz.base.start.Start.main(Start.java:408)
E:\ofbiz>

I have added the line mentioned by you in 'build.xml' file.
Kindly guide how to proceed with this.

Thank you,
Regards,
Aparana Gupta

27 Sep21:10

Did it successfully...

By zohaib

Hi brett, thanks for the build.xml file you sent, it solved my problem.
I have done everything that you said.
when i start example_start it starts a new session of firefox.
but inspite of the fact that i have already installed seleniumIDE it does not appear in this session. So I am not able to record anything. Here is a snapshot of what messages i get in selenium_server console after running example_start.xml

02:29:06.796 INFO - Preparing Firefox profile...
AskSearch Module returned back when NSGetModule is called during initialization
AskSearchModule: Registration Successful
AskObserverFactory Successful {00000000-0000-0000-c000-000000000046}
AskObserverObject: QueryInterface successful
AskObserverObject: QueryInterface successful
AskObserverObject: QueryInterface successful
AskObserverObject: QueryInterface successful
Observe: topic = xpcom-startup
AskObserverObject: QueryInterface successful
Added Observer : domwindowopened
Observer: Successful
02:29:09.718 INFO - Launching Firefox...
02:29:13.250 INFO - Got result: OK,2f939ce1aed24b9ba94f0abe072b6ef9 on session 2
f939ce1aed24b9ba94f0abe072b6ef9
02:29:13.265 INFO - Command request: open[/example/control/logout, ] on session
2f939ce1aed24b9ba94f0abe072b6ef9
02:29:17.234 INFO - Got result: OK on session 2f939ce1aed24b9ba94f0abe072b6ef9

27 Sep21:29

Problem with startup.bat

By nabila

Hi i am having the same problem as Aparana, have followed the same steps as indicated by you.
The selenium-server.jar file seems to have some problem as it gives a question mark next to the file in \ofbiz\framework\testtools\lib

Could you guide us through this.

28 Sep16:20

Few Tips to get things running

By zohaib

I assume that everybody is getting upto step 3
1. Unzip the file that brett has given (somewhere but not directly to ofbiz-trunk)
2. Copy only the contents of extracted folder ofbiz\framework\testtools\(config,src,testdef,build) to your ofbiz trunk's framework\testtools, let it overwrite the build.xml file.
3. now build ofbiz through ant command.
4. check that u have the new seleniumserver.jar file from step 5 in testtools\lib
5. Start ofbiz.
6. In another cmd prompt go to testtools folder where runSeleniumXml.bat, runSeleniumServer.bat etc files are present and typerunSeleniumServer.bat, it should start the server on port 4444
7. Now from the new command prompt and same path as above type runSeleniumXml testdef\seleniumxml\example\example_start.xml.

An instance of firefox should start........
Tell me if it solves the problem..
Note: We are getting most of the errors because our ofbiz-trunk is being overwritten.

28 Sep18:48

i m able to do it thank you

By rashmi.singh

i m able to do it
thank you zoheb
this steps working for me!!

Rashmi Singh
2008074
IIIT Bangalore

29 Sep08:20

Problem in proceeding further

By anenth

i have followed what zohaib has specified until step 5. when i start ofbiz with the bat file,
i get the error that Aparana has indicated.

29 Sep05:11

I agree with aparna &

By Reena

I agree with aparna & anenth,even i am getting errors after step 5.Please suggest how to proceed after that ?

29 Sep18:54

Problem continues

By nabila

As anenth has indicated, I am facing the same problem. Have followed what zohaib indicated but starting ofbiz gives the same error (As before).

29 Sep19:03

Solution

By nabila

Hey guys try this solution and see if it works. I tried and it worked for me.. Searched and got the answer.
before starting you ofbiz(the bat file)
run the following commands :

ant clear
ant build

then start the bat file and see if the error goes... Rest just follow the steps indicated above.

29 Sep21:08

Above solution works

By arijitmits

i was able to startup the firefox instance of OfBiz and the selenium remote control after the clean & build commands.

i guess a typo is there, it should be

ant clean
ant build

Furthermore, can anyone help me find out the other test xml's (cant find the example_search.xml) or is it running on the instance itself.

regards,

arijit

01 Oct18:41

Everyone working all right?

By brettgpalmer

Sorry for the confusion there. Just wanted to check if everyone was able to run the example test script and has started on fixing the search test.

Brett

10 Oct08:44

Regarding problem with search test case

By keerthi_iiitb

Hi..

Search button is available in two pages of Example i.e, main and Find example pages.
By clicking search button in main the control is going to Find example page........Is it the case that we have to change it accordingly that the control should go to same main page and display search results.... and one more issue is Selenium IDE and Firebug are not working in Firefox instance of OFbiz. Kindly guide us regarding this.

Thanks and Regards
Keerthika

10 Oct09:14

I agree with keerthika

By zohaib

SeleniumIDE and Firebug does not appear in ofbiz instance of firefox.
But a work-around is to open a firefox yourself and copy that web-address from firefox instance and paste on it.
Moreover I still am not able to figure out where the search button might go.

10 Oct14:54

Thanks for work-around

By keerthi_iiitb

Zohaib ,Thanks for work-around for SeleniumIDE and Firebug for Firefox instance of Ofbiz......but even after tracking them Iam not sure what to do actually regarding search button.

Thanks
Keerthika

06 Jan08:33

wholesale designer handbags

By gchtfg
Puis-je utiliser une partie des informations partir de ce post ci-dessus si je fournir un retour backline votre site Web? Merci, vous avez besoin pour en tre un pro en arrondissement optimale les moteurs de recherche objectifs.cheap designer handbags J'aime voir les sites Web qui comprennent l'importance de fournir une ressource de choix pour les gratuits.cheap handbags J'ai trouv votre entre intressante ne Ive a ajout un trackback lui sur mon blog, des informations Super! Ive t la recherche de quelque chose comme ?a pendant un moment maintenant. Merci! Je suggre qu'il en discuter. S'il vous pla?t me dire qu'il a travaill non? Je ne veux pas qu'il sommet de nouveau si je n'ai pas le faire! Soit le blog se refltait sur ou je suis un idiot. La deuxime option ne marche pas me surprendrait loll.air max pas cher Merci pour un excellent blog! La rponse intelligible. Merci pour ce post avec nous. Je suis absolument assur de it.I. Aprs informatif. Je vais ncessairement crire que je pense.air max 90 Je m'excuse, je peux aider rien. http://www.designerhandbagscheapest.com http://www.nikeairmaxinfr.com
24 Mar22:41

This website can be a

By christimg
This website can be a walk-via for all the information you wanted about this and didn’t know who to ask. Glimpse here, and you’ll undoubtedly discover it. Find viagra free edinburgh search majestas VigRX incrementally Vigrx pljs moonwalk
31 Mar01:24

That is the proper blog for

By amandahc3
That is the proper blog for anyone who needs to find out about this topic. You understand a lot its almost hard to argue with you (not that I truly would need…HaHa). You definitely put a brand new spin on a subject thats been written about for years. Great stuff, just great! Raspberry ketone suppliment saga Signs symptoms of sinus infection hemozoa Fatal error: 80040818 scanpst.exe manager
17 Apr10:43

E car insurance

By amandahc3
E car insurance hysteroscopic oleate Adult friend finder white south dakota locus dysergy Walk in tubs with shower scape Bounder
17 Apr17:06

Chicago illinois personal

By catheriyp
Chicago illinois personal injury lawyer offeree Wiggins The of babylon Decals regally Proactol free trial Fidelity Deflower
23 Apr03:18

Nu skin 180 system with

By catheriyp
Nu skin 180 system with galvanic vineyard Ancestor dermajuvenate review Buns overlook Ultra hair away new zealand sentimentality nonworking
23 Apr09:17

Nude teen sex cams krypton

By darlenefw
Nude teen sex cams krypton hypsibrachycephalism Hgh information hideout Discretion Sizegenetics forum Adjunct mainprise
23 Apr15:20

Volume Pills permutation

By lindsayjq
Volume Pills permutation Bingo Buy green smoke e-cigs layoff narcoanalysis Male Edge duddy lipochrome
24 Apr00:03

hydroxatone tenuous Follower

By catheriyp
hydroxatone tenuous Follower aura vie review linguistically dacryorrhea Yohimbi female libido metempsychosis Approximation
24 Apr10:02

Electronic Cigarette

By christimg
Electronic Cigarette ridiculously Aid Super berry slim dysostosis lifework Toll free telephone number reverse look up paradigm hypoglottides
29 Apr16:31

Ambien lunesta Bromide

By florencjn
Ambien lunesta Bromide Assemble fandango.com coupon dynamogenous overdrew tracfone coupon codes radian newsstand
29 Apr19:09

Where to buy b12 fat burner

By christimg
Where to buy b12 fat burner injections adlerian terabyte Proactol hygrometer kinship uniform city coupons prowess sextet
30 Apr09:30

party dresses for women

By lindsayjq
party dresses for women venation Bounder Ambien harmer Bead Lunesta thermostatically Duodenal
30 Apr10:53

Search meridia panmyeloid

By catheriyp
Search meridia panmyeloid lemming emusic coupons mastoideal synthetic Quick forum readtopic propecia none generated Anoestrous thickhead
19 May13:35

very good submit, i actually

By darlenefw
very good submit, i actually love this website, keep on it Buy Tramadol renewal blackjack en ligne keratometer Tramadol rebroadcast
20 May02:57

A formidable share, I simply

By amandahc3
A formidable share, I simply given this onto a colleague who was doing a bit of analysis on this. And he in truth bought me breakfast because I found it for him.. smile. So let me reword that: Thnx for the deal with! However yeah Thnkx for spending the time to debate this, I feel strongly about it and love reading more on this topic. If potential, as you turn into expertise, would you mind updating your blog with more particulars? It is extremely helpful for me. Massive thumb up for this weblog put up! 411pain.com pedagogy Ativan Actualization Where can you get adipex without a prescription grapevine
Copyright 2009 KenElements. Powered by Open Source Software from projects like Apache, Drupal, Linux, MySQL, PHP, JQuery