Failing to build QA framework with error

Lately, whenever I run mvn clean install against QA framework, it brings strange logs and fails
. When tests are pushed, most of them don’t pass the CI tests. How can I solve this problem?

@k.joseph @kdaud @sharif

Pull the latest changes from uitestframework and distro-referenceapplication module and build them following their hierarchy → then build qaframework module after pulling its latest changes and share the experience

What do you mean by this ?

1 Like

When i follow the istructions , uitestframework and distro-refrenceapplication build very well but qa framework fails with this error

i just think it could be the cause of the failing CI tests on the pull requests i last made . please help @kdaud @ibacher @bistenes

Issues are rising from the command you are using:
mvn clean install :x:
You will need to use the command
npm run
based on which workflow you want to trigger. You can see the list of all the configured commands within the repo by running
/openmrs-contrib-qaframework$ npm run

Use case: If one needs to run Vitals and Triaging test workflow for 2.x RefApp then using
npm run vitalsAndTriagingTest
triggers that specific workflow to run.

Note:

  • You need to make sure you have node installed in your machine

  • (OPTIONAL) You may need to do some changes in the test.properties file like changing the webUrl to point to your local instance since the default value redirects to an online server which may not to be a good idea if your connection is slow. You can as well change the headless property to false if you would wish to see the test via UI

1 Like

Ohh thanks @insookwa for the catch, this error exists even on master branch , Sorry for late response, this actually happened last week after some E2E commits got merged recently, its an issue from within firefox version and probably geckodrivers looking into Crazy log spam when running in headless mode with Selenium · Issue #1898 · mozilla/geckodriver · GitHub was reported cc @ibacher @bistenes

1 Like

Thanks @kdaud However when i run this command against my latest clone, i get kind of the same error

Thanks @sharif it looks to be in this line , How can we fix it

Well, these are things we could fix! E.g., we could use the Maven Frontend Plugin to ensure an appropriate version of Node and NPM are installed and perhaps have different Maven profiles to run the appropriate NPM script.

I setup something similar to this for the Addon Index which slightly changes the build-script executed depending on if it’s run for production or development. The nice thing about putting this all in Maven is we can hide some of the complexity.

3 Likes

This is a good idea as I observed when the Node and NPM are of lower version the build takes longer than when the version is higher.

Does this mean adding the configuration below in pom.xml file to have auto update ?

<plugin>

    <groupId>com.github.eirslett</groupId>

    <artifactId>frontend-maven-plugin</artifactId>

    <version>LATEST_VERSION</version>
    ......
  
</plugin>

Unfortunately, we can only use version 1.11.3 of that plugin, as the lastest version does not support the version of Maven on our CI server. But otherwise, yes.

1 Like

This has been sorted out in a call with @kdaud

one of the steps was first to update all the repositories with the master branch, then using npm run to list all the available tests that can be executed. then npm run (any desired test ) which builds successfully

i just learned there is no need to build qa framework as it depends on distro and UItest framework with are building sucessfully

Amazing to see your continued growth with QA technical work! Keep up the good work :grin: !

1 Like

Following up on this epic, I discovered we already have the frontend-maven-plugin with the qaframework module. However, the current version is set to 1.9.1 and have upgraded the version up-to-the one that can be supported by our CI server.

Have made a commit here. cc: @ibacher