Simulating automated tests with standalone

I am engrossed with the work!

Have not succeeded with running against my local instance. However, for the meantime i redirected to run against online instance and things are interesting. Though its very slow via the online instance and I think performance should be better via the local instance. I fired standalone to run, and then changed the url to http://localhost:8082/openmrs-standalone and during instantiation the page below is thrown


cc: @k.joseph

you still have some url issues. can i take a look at your code please?

This is my test.properties file

webapp.url=http://localhost:8082/openmrs-standalone
login.username=admin
login.password=Admin123
login.location=Pharmacy
webdriver=chrome
login.auto=false
headless=false
webdriver.gecko.driver=firefoxdriver/mac/geckodriver

i mean your codw

The attempt is on the allergy feature that was already written by some committer. So by simulating the already existing working feature, will help me comprehend what to do and where to rectify things. Though i made some changes in the RunnerTest.Java and test.properties file to meet my requirement. Actually when i redirect to the online instance, the feature seems to work but it breaks suddenly due to request time out(probably maximum lease-time that was set on page requests). From that point i want to be using a local instance to eliminate that barrier, its even very slow via online taking almost 5 minutes though it suddenly breaks

Have spent three hours trying to figure out how to connect to standalone but have not yet succeeded but I know i will succeed. Have optionally thought about this alternative but seems also not to work out

According to the error message, it suggest to me as if tomcat need to be fired for this to succeed. However, as far as I know standalone is bundled with tomcat. Am still figuring out what exactly to do

Actually i was curious when simulating my feature under construction, and on redirecting to an online instance, the behavior was promising with auto logging in into the ref app but on loading the patient dashboard page it had the same behavior of time out issues just as observed with the allergy feature. Prior to this, I made changes in the definition steps logic after having observed the error that was observed on the first attempt to test it

Currently blocked. However, I have given several attempts in redirecting my application to the standalone server by this url http://localhost:8082/openmrs-standalone but have not yet got joy. In the nutshell, am installing openmrs with docker and after the installation i will redirect the app to that server. Hope it will respond this time.
cc: @k.joseph

Great feel free to describe how you were un blocked such that any other person can learn from your experience in future thanks

1 Like

Failure when connecting to standalone server
I get failure connection when automating tests with standalone server. When the web.url property is set to standalone instance, the connection fails with the error log
This is the content of my test.property file
webapp.url=http://localhost:8084/openmrs-standalone
login.username=admin
login.password=Admin123
webdriver=chrome
headless=false
webdriver.gecko.driver=firefoxdriver/linux/geckodriver


The same error occurs both on qaframework module and openmrs-distro-reference-application module when simulating both the new selenium tests and the existing reference application tests respectively

cc: @dkayiwa

Sorry for this @kdaud, Idealyy this may not be related with standalone specifically, I would think its related to either your cache files being not well which is not something to rely on, do you have some time we meet on zoom in 1hr to continue debug this,

Meanwhile , try a different package of standalone in a different folder feel free to share the feedback

@sharif have done a new extract however, the same error is thrown. Where are the caches located, have not tried on clearing them

@kdaud you could do a quick search on google on how to clear the cache of chrome browser

@herbert24 have made the clearance but it has not solved. However, the log occurs on both chrome and firefox

try installing the sdk

sdk gives a poor performance due to my pc specifications. So standalone gives a better performance

What happens when you delete the “work” folder under the standalone’s tomcat folder and try again?

Let me do it and find out

Have given several attempts on

Have given several attempts on this including restarting the pc but the log remains the same. I notice that this folder is recreated whenever the server is invoked :exploding_head: