Testing/Behat Testing/Error & Solutions
From Mahara Wiki
< Testing/Behat TestingRevision as of 10:18, 30 March 2015 by Jinelleb
Errors when using Behat
This is a place where you can log errors and come to fix yours. If you log an error please be sure to put down how you fixed it
Selenium upgrades causing firefox to try run headless and not open firefox. It can also throw an error when you try run the test. It will mention something about the Selenium server not being able to start up.
TO FIX: Go to the mahara_sh script. Currently located in mahara/test/behat and update the version. I can access that in the file explorer and then I just change the version number and then it auto updates when I run the ./test/behat/mahara_behat.sh rundebug @tag
To find out if Selenium has updated to a new version, go to http://www.seleniumhq.org/download/ and see version of the Selenium Server is available.
You might need to do some more debugging. But this information should point you in the right direction.
Firefox upgrades and when you run the tests Firefox wont pop up with the Mahara instance in it. Another issue is the window opening but Behat not being able to run the test properly and it will say that you cant log in. It will run the first log in steps (say as an admin) but it wont pass the next step and if you actually look at Behat running (requires you to not be running it headless) then you will see it's not actually logging in.
TO FIX: Generally Firefox and Selenium are heavily entwined. When Firefox breaks, go to http://www.seleniumhq.org/download/ and download the newer version of Selenium. When one upgarades it's usually best to upgrade the other at the same time so they are compatiable.
If all else fails
I change directory to downloads and run this in a separate terminal. java -jar selenium-server-standalone-2.44.0.jar -Dwebdriver.firefox.bin=/home/jinelleb/Downloads/firefox/firefox