Foros de discusión

RE: Automated test for liferay portlet

thumbnail
Joga Krish, modificado hace 11 años.

Automated test for liferay portlet

Junior Member Mensajes: 38 Fecha de incorporación: 8/01/13 Mensajes recientes
Hallo Everyone,
I am new to liferay. Do you have any simple examples or links or vedios where I could get more
information about "How to do an automated test for a liferay portlet". I have not done any automated tests before.
If you could share all the details regarding the automated test may from the scratch would be much appreciated.

Thank you

Cheers,
Krishna.
thumbnail
Jan Geißler, modificado hace 11 años.

RE: Automated test for liferay portlet

Liferay Master Mensajes: 735 Fecha de incorporación: 5/07/11 Mensajes recientes
What kind of automated test should this be?
Unit test, GUI tests, Integration Tests.....

There are so many things you might be considering to test. Any additional Information would be really helpfull. But for the first shot:
JUnit, Selenium.
As for Automated builds and Testing try Jenkins.

Hope this gets you on track.
thumbnail
Joga Krish, modificado hace 11 años.

RE: Automated test for liferay portlet

Junior Member Mensajes: 38 Fecha de incorporación: 8/01/13 Mensajes recientes
Hai jan,
Thank you soo much for the reply.
I want to start with Junit test.
Are there any simple examples available ?
I have found couple of links with some information but they seems complicated to me.
thumbnail
Jan Geißler, modificado hace 11 años.

RE: Automated test for liferay portlet

Liferay Master Mensajes: 735 Fecha de incorporación: 5/07/11 Mensajes recientes
Well, actually there is no easy way AFAIK, because you would have to set up a complete ApplicationContext with Spring to get the UnitTests working.

So long
Jan
thumbnail
Joga Krish, modificado hace 11 años.

RE: Automated test for liferay portlet

Junior Member Mensajes: 38 Fecha de incorporación: 8/01/13 Mensajes recientes
Thanks Jan. Well eventhough if there is no other way to start simple , I have to do it.
I do not have any other option.
If you dont mind could you please suggest me any references to set up a complete ApplicationContext with Spring to get the UnitTests.
That might me helpful for me to start.
Siby Mathew, modificado hace 11 años.

RE: Automated test for liferay portlet

Expert Mensajes: 268 Fecha de incorporación: 4/03/11 Mensajes recientes
Hi Joga,
Liferay has a class called BaseServiceTestCase available in the liferay source code.
For testing purpose, you can add the source to your project and extend this class and call the setup() method which does all the spring initializations.
This loads all the necessary properties files as well.
Try to understand how the initializations are done and go ahead with your testing.

All the best !

Thanks,
Siby
thumbnail
Joga Krish, modificado hace 11 años.

RE: Automated test for liferay portlet

Junior Member Mensajes: 38 Fecha de incorporación: 8/01/13 Mensajes recientes
Hi Siby,

Tons of thanks for your reply.
I will start doing it now.
I have a small doubt.
Is it necessary to install a seperate database SQL for liferay or Can I use simply HSQL.
Currently I am using default database HSQL along with Tomcat.

Cheers,
joga.
Siby Mathew, modificado hace 11 años.

RE: Automated test for liferay portlet

Expert Mensajes: 268 Fecha de incorporación: 4/03/11 Mensajes recientes
Hi Joga,
You can use anything based on your requirement.
You can easily switch to MySQL by specifying it in the portal-ext.properties.
Liferay automatically creates all the necessary tables

Thanks,
Siby
thumbnail
Dimitri Tischenko, modificado hace 11 años.

RE: Automated test for liferay portlet

New Member Mensajes: 22 Fecha de incorporación: 10/11/11 Mensajes recientes
We are using exactly this combination:
  • Jenkins - automatically start a build / test run after a commit of a project. We use Debian Squeeze with iceweasel. We use the Xvfb plugin in Jenkins which enables us to run iceweasel's Firefox without an actual screen.
  • Selenium - we use selenium to write integration tests for the portlets. We do not use unit testing.
  • JUnit - we use JUnit to write and run the tests.

Links:
  • http://en.wikipedia.org/wiki/Mozilla_Corporation_software_rebranded_by_the_Debian_project
  • http://en.wikipedia.org/wiki/Xvfb

Jan Geißler:
What kind of automated test should this be?
Unit test, GUI tests, Integration Tests.....

There are so many things you might be considering to test. Any additional Information would be really helpfull. But for the first shot:
JUnit, Selenium.
As for Automated builds and Testing try Jenkins.

Hope this gets you on track.