Chrome or Firefox for UI testing ?

Hello,

I’d like to add UI testing in our implementation.

Following the documentation, we could/should use Chrome web driver instead of Firefox:

You can use Chrome brower instead of Firefox browser. New versions of Firefox work incorrectly on Windovs 7 and 8, so you must use old Firefox version, e.g. 15. Before committing not forget to ignore pom.xml

https://wiki.openmrs.org/display/docs/UITestFramework

But when I run tests on openmrs-distro-referenceapplication, master branch, with the chrome driver, all tests are in error.

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.openmrs.reference.CaptureVitalsTest
Running locally...
test.properties found: file:/home/romain/repos/openmrs/openmrs-distro-referenceapplication/ui-tests/target/classes/org/openmrs/uitestframework/test.properties
test.properties:
{webapp.url=http://devtest01.openmrs.org:8080/openmrs, login.password=Admin123, login.username=admin, webdriver=chrome}
webapp.url: http://devtest01.openmrs.org:8080/openmrs
login.username: admin
login.password: Admin123
webdriver: chrome
Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.244 sec <<< FAILURE! - in org.openmrs.reference.CaptureVitalsTest
captureVital(org.openmrs.reference.CaptureVitalsTest)  Time elapsed: 0.242 sec  <<< ERROR!
java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.getTempDirectory()Ljava/io/File;
	at org.openmrs.uitestframework.test.TestBase.setupChromeDriver(TestBase.java:202)
	at org.openmrs.uitestframework.test.TestBase.startWebDriver(TestBase.java:128)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

see more

Should I change something else than the value of <webdriver>chrome</webdriver> in order to use Chrome?

You might want to try a later version of the driver

I would treat that comment from the documentation as something that was true at the point it was written, but not necessarily still accurate today.

The UI tests have always been a little flaky. However if they are all failing it’s probably a configuration problem…