Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Kishore Shetty
Junit Test for Liferay Service
30. April 2010 02:18
Antwort

Kishore Shetty

Rang: New Member

Nachrichten: 3

Eintrittsdatum: 31. März 2010

Neue Beiträge

Hello,

Liferay service builder is a great utility. But when it come to testing Liferay service class, there are some information available. But I couldn't find any complete example for junit test cases. I am new to Liferay, got information about test setup
public void setUp() {
ServiceTestUtil.initServices();
ServiceTestUtil.initPermissions();
}

public void tearDown() {
ServiceTestUtil.destroyServices();
}

I developed a service to manage (MyMasterDataLocalService) CRUDE operation on a Business entity. Service builder, I deployed and stuck up in testing. Can any one share an example in detail. Like

1.portal-test.properties
2.test-portal-impl.properties
3.Invoke service
4.Class path settings

Alternatively can we use Spring TestCases with @contextconfigurator ?. Problem with this is Hibernate file are not getting loaded. To load hibernate file is not possible as it doesn't follow the Spring DTD.

Looking forward valueable information. Thank you.

regards,
Kishore
Nicolas Forney
RE: Junit Test for Liferay Service
28. Juli 2011 03:08
Antwort

Nicolas Forney

Rang: Junior Member

Nachrichten: 63

Eintrittsdatum: 23. Mai 2011

Neue Beiträge

Hello,

It's an old post, but could be useful to someone else :
Have a look at :
https://projects.savoirfairelinux.com/projects/ctr-liferay/wiki/Portal_-_Testing

Regards,