BUILD FAILURE on running mvn clean install on openmrs-contrib-qaframework

Share the settings of your test.properties file within the qaframework repo located at:
src/test/resources/org/openmrs/uitestframework/ directory

webapp.url=https://qa-refapp.openmrs.org/openmrs
login.username=admin
login.password=Admin123
login.location=Pharmacy
webdriver=firefox
login.auto=false
headless=true
webdriver.gecko.driver=firefoxdriver/linux/geckodriver

Do you have Firefox installed on your PC ?

yeah i do…

You need to create a directory within your local repo that stores firefox driver since its currently missing for windows os. And then download a firefox driver that is compatible (matching) with your firefox version your are running on your machine. Create a directory for windows at src/test/resources/firefox/ and name it windows so the directory will therefore be src/test/resources/firefox/windows/ then place the downloaded firefox driver into that directory. You can download one from here but ensure to first check the browser version you are running to make sure you download the one that is compatible.

Then ensure to change the driver location value in test.properties file to webdriver.gecko.driver=firefox/windows/geckodriver

Waiting to hear the experience.

1 Like

@kdaud is this already in the wiki documentation?

We have a section for this but it doesn’t capture windows os and we are currently missing a directory for the driver engines for windows os within our repo. We have linux and mac os covered well.

Am taking the initiative to do the necessary and will make a PR that caters drivers of windows os for both firefox and chrome engines and as well update the wiki accordingly.

1 Like

followed to the latter but the error below is persistent therefore bulid fails

[ERROR] Unknown lifecycle phase "and". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]

Meanwhile as am looking into the logs, @mherman22 please always share a full log report via pastebin.com

1 Like

@dkayiwa have made a PR that adds drivers for windows os. Have as well updated the QA Documentation wiki accordingly.

As well have upgraded the chrome driver version for linux os in this PR since the currently is of lower version and is failing builds locally for the chrome engine.

1 Like

Thanks @kdaud @dkayiwa , Hello @mherman22 have you tried cleaning your .m2.e folder and build all the modules (uitestframework, referenceapplication-distribution, and qaframewor) a fresh to down all the artifacts and see if that helps.

Am skeptical about cleaning .m2 repo since this will result into loosing all the artifacts within the directory and might not be a good ideal. Unless its only deleting artifacts of contrib & distro stored at .m2/repository/org/openmrs/ and then rebuild an updated uitestframework and distro-referenceapplicationmodules could be a good move.

AFAIK the repo is missing drivers of windows os and is probably the reason why things are hanging being that some of the default test.properties file value are not in favor for windows os. Have made PR which I shared above to cater for windows os hopefully @dkayiwa is taking a look!

He can copy them into a separate folder without manually loosing them , clean the m2.e folder then do a clean build , windows os sometimes are not stable on artifactory dependencies ,thats another option of not loosing the dependencies locally.

1 Like

Hope @dkayiwa is taking a review on the PRs above to have chrome and firefox drivers for windows os added in the repo.

@mherman22 pull the latest changes from qaframework repo and set the webdriver location value in test.properties file to webdriver.gecko.driver=firefoxdriver/windows/geckodriver.exe

As well I would recommend you spin from your local instance if your connection is not stable. This means changing the webapp.url value point to your local instance for example:

webapp.url=http://localhost:8080/openmrs

in case your local instance is running on port 8080.

Waiting to hear your experience!

1 Like

Well done @kdaud

@mherman22 just checked you out to find out your progress!

i did this, got the local instance then change the web URL to point to the local instance with the thought of maybe having a poor connection. However, the issue persists. same error. All the others (uitestframework & distro) build well.

i then used mvn clean install -DskipTests=true to install the dependencies.

Can we schedule a call and have a look at the issue and we figure it out? Are your speakers ok?

1 Like

Can be make it on Sunday from 5:30 PM EAT ! Does it work for you ?