Reference Application UI Tests Failures!

Could any one be knowing the cause of these failures? https://ci.openmrs.org/browse/REFAPP-DUT

I have disabled the plan until we have time to look into why the server is not starting up properly. It started to happen after upgrading openmrs-core to 2.x so it may be related.

Do you mean the upgrade from 2.0.1 to 2.0.2? https://github.com/openmrs/openmrs-distro-referenceapplication/commit/6922356ec3e9cb45a3c6af8fe5c262f17de6d4e3

No, the upgrade from 1.x to 2.x… when legacyui module was introduced. It seems to fail to start randomly.

@raff when do we plan to enable this plan again? Am asking because now some commits are breaking the reference application in ways that some of our existing tests used to catch, but not any more. As an example, http://int02.openmrs.org/openmrs/ is broken but there is no way of the committer being automatically notified. I think it could be the same reason as to why we did not catch Registration Summary Page Broken – Reference App until when @mogoodrich reported it. :slight_smile:

Just on a side note, https://ci.openmrs.org/browse/SDK-SDK-213 is broken too.

If travis is the problem, then we can take the tests back to bamboo. :slight_smile:

I don’t think it’s a travis issue. It’s an issue of modules not starting up occasionally when starting a fresh reference application server. I didn’t have time to look into that yet. The misbehavior can be seen e.g. here https://saucelabs.com/beta/tests/ca1a143afda84356a0347637fd83acaa/watch

Server logs are supposed to be pasted at the end of https://travis-ci.org/openmrs/openmrs-distro-referenceapplication/builds/192023595 but they are not there since we exceeded the log limit (we need to fail tests faster in case of modules not starting up).

@raff so what is the way forward? :slight_smile:

Either me finding time to look into those failures or someone else (I think @adamg from @SolDevelo tried at some point, but with no avail). Basically one needs to configure ALL tests to fail fast in case no login screen shows up and then look at Tomcat logs to see why modules do not start up.

If it involves me then it needs to wait until next Monday.

@raff if am to help or any one else, can you give us some pointers? Like where the server logs are, or anything else you think would be useful.

@dkayiwa, perfect. As I wrote in my previous post Tomcat logs should be appended in build logs on Travis, however our tests get stuck and produce too much output, which exceed build log limit of 4 MBs on Travis.

Therefore, we first need to fix things so that tests fail fast when server is not properly initialized. I attempted to do it at https://github.com/openmrs/openmrs-contrib-uitestframework/commit/ff4db0069ac4b4fbfec7868433e9d144a442675f but for some reason you can still see in logs that they are being rerun too many times…

Once you fix tests to fail fast in a scenario when server is not properly up, then you will see Tomcat logs being appended by Travis at the end of build log and hopefully see why modules don’t start.

@domenico may be able to help with the issue as well.

Ok guys I can help you, but give me some time since I have hard work to do during this week.

For now, i have enabled the bamboo plan to run these tests, but disabled the provider test which fails as per the details at https://issues.openmrs.org/browse/RA-1200

I have a guess about why the tests do not fail fast. Is it possible to visualize the page with the text “If you are seeing this page, it means that the OpenMRS Platform is running” somewhere on the integration server? Basically I’d like to reproduce Rafal conditions. Thank you.

I guess your best bet is to run the server with platform 2.0.1 locally without any modules… The easiest way is to setup a platform with SDK… see https://wiki.openmrs.org/display/docs/OpenMRS+SDK#OpenMRSSDK-Settingupservers

Rafal,

I’m trying to install OpenMRS, but I got a problem. Regarding your issue, what I guess it does not work properly is the following method which returns false even if it should return true.

public boolean containsTextWithoutWait(String text) {
return driver.getPageSource().contains(text);
}

Some users report of a problem with getPageSource. Maybe here we have the same issue, unfortunately I can’t verify my hypothesis. I hope to make OpenMRS work asap and provides your with a solution.

@domenico, I replied to the problem you reported. We need to change the condition to use something different than getPageSource() then…

Yes, but I have to verify if my guess is correct.

@raff as we figure out how to append tomcat logs to the build logs on travis, how can i get access to the source tomcat logs? That will help me figure out why the current tests fail. In other words, can i access the tomcat logs as i used to, when the tests were running on our bamboo server?

@dkayiwa, I’ve committed https://github.com/openmrs/openmrs-contrib-uitestframework/commit/7ade6b9910c482647749231309867c4c5d511258 so that when we have a server failure, no other tests will run. You can see that Tomcat logs are now appended at the end of the travis log file at https://travis-ci.org/openmrs/openmrs-distro-referenceapplication/builds/194852568 (expand travis_after_script.sh)

Currently, the build is passing. We’ll need to wait for a server failure to see if my fix works and then we can look at Tomcat logs.

Thanks @raff :smile: