Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
Joga Krish
Automated test for liferay portlet
23 de enero de 2013 1:38
Respuesta

Joga Krish

Ranking: Junior Member

Mensajes: 38

Fecha de incorporación: 8 de enero de 2013

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.
Jan Geißler
RE: Automated test for liferay portlet
23 de enero de 2013 2:54
Respuesta

Jan Geißler

Community Moderator

Ranking: Liferay Master

Mensajes: 735

Fecha de incorporación: 5 de julio de 2011

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.
Joga Krish
RE: Automated test for liferay portlet
23 de enero de 2013 3:09
Respuesta

Joga Krish

Ranking: Junior Member

Mensajes: 38

Fecha de incorporación: 8 de enero de 2013

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.
Jan Geißler
RE: Automated test for liferay portlet
23 de enero de 2013 3:21
Respuesta

Jan Geißler

Community Moderator

Ranking: Liferay Master

Mensajes: 735

Fecha de incorporación: 5 de julio de 2011

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
Joga Krish
RE: Automated test for liferay portlet
23 de enero de 2013 3:26
Respuesta

Joga Krish

Ranking: Junior Member

Mensajes: 38

Fecha de incorporación: 8 de enero de 2013

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
RE: Automated test for liferay portlet
23 de enero de 2013 6:29
Respuesta

Siby Mathew

Ranking: Expert

Mensajes: 267

Fecha de incorporación: 4 de marzo de 2011

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
Joga Krish
RE: Automated test for liferay portlet
24 de enero de 2013 2:17
Respuesta

Joga Krish

Ranking: Junior Member

Mensajes: 38

Fecha de incorporación: 8 de enero de 2013

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
RE: Automated test for liferay portlet
25 de enero de 2013 6:24
Respuesta

Siby Mathew

Ranking: Expert

Mensajes: 267

Fecha de incorporación: 4 de marzo de 2011

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
Dimitri Tischenko
RE: Automated test for liferay portlet
11 de febrero de 2013 2:46
Respuesta

Dimitri Tischenko

Ranking: New Member

Mensajes: 22

Fecha de incorporación: 10 de noviembre de 2011

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.