We try to test our portlets for Liferay 6.0.6 via Selenium. We have few liferay mvc portlets and vaadin portlets. In first approach we create test which do steps below:
After We start selenium tests (test portlets behavior, upload files via vaadin portlets, approving workflow (kaleo) tasks via vaadin portlets etc). And tests failed in different places:
More unstable behavior we get when start test on Jenkins node on VM.
How do you test your portlets? Is there a way to stable behavior of test? What is a best practice?
Some times DuplicateFileException occurs during uploading file via our portlet (but in document manager there are no files)
it would be very useful to see the full stacktrace
Some times Selenium can not find elements on page.
I see 2 possible reasons/solutions:
If a portlet is using ajax to load the content then your test should wait until the content has been loaded, try:
waitForElementPresent(locator)
If you do not use Vaadin TestBench then make sure you set debugId for vaadin elements:
setDebugID("aButton");
How do you test your portlets?
We used selenium and cucumber, see: https://projects.savoirfairelinux.com/projects/ctr-liferay/wiki/Portal_-_Testing
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With