Skip to content

Instantly share code, notes, and snippets.

These cases are based upon assumptions that I have of what "perfect" or really good functional tests should be like.

  1. Have a setup that cannot fail, or if it does fail, it is covered by a lower level test (integration/persistence).
  2. Test what it is supposed to test after, without too much overlap with same-layered tests to avoid dependency issues. (Fetch,Get integration tests often have this issue)
  3. Readable. Anyone should be able to look at a test and be able to understand what it does
  4. Maintainable. There should be a clean hierarchy of the macros that prevent tests from breaking each other, but also allow fixing certain macros to fix ones that it should depend on.

Pre-req Notes: Good test qualities

---
description: "Filing Bug Tickets Description"
icon: "Sample"
layout: "guide"
title: "Filing Bug Tickets"
weight: 2
---
# Filing Bug Tickets
Follow these steps if you found a bug in Liferay.
[
{
"active":true,
"classNameId":"20036",
"classPK":"20100",
"companyId":"20100",
"creatorUserId":"20104",
"description":"",
"descriptionCurrentValue":"",
"descriptiveName":"Global",
[{"active":true,"classNameId":"20007","classPK":"20140","companyId":"20100","creatorUserId":"20140","description":"","descriptionCurrentValue":"","descriptiveName":"Test Test","friendlyURL":"\/test","groupId":"20143","groupKey":"20140","inheritContent":false,"liveGroupId":"0","manualMembership":true,"membershipRestriction":0,"mvccVersion":"0","name":"","nameCurrentValue":"","parentGroupId":"0","remoteStagingGroupCount":0,"site":false,"treePath":"\/20143\/","type":0,"uuid":"ed7bb5b9-1369-267a-b7df-a1401ef5ed13"},{"active":true,"classNameId":"20002","classPK":"20117","companyId":"20100","creatorUserId":"20104","description":"","descriptionCurrentValue":"","descriptiveName":"Control Panel","friendlyURL":"\/control_panel","groupId":"20117","groupKey":"Control Panel","inheritContent":false,"liveGroupId":"0","manualMembership":true,"membershipRestriction":0,"mvccVersion":"0","name":"<?xml version='1.0' encoding='UTF-8'?><root available-locales=\"en_US\" default-locale=\"en_US\"><Name language-id=\"en_US\">Control P
2018-09-10 23:28:09.998 INFO [main][HotDeployImpl:221] Deploying lcs-portlet from queue
2018-09-10 23:28:10.000 INFO [main][PluginPackageUtil:1001] Reading plugin package for lcs-portlet
2018-09-10 23:28:10.407 ERROR [main][ContextLoader:225] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.lcs.command.CheckHeartbeatCommand' defined in ServletContext resource [/WEB-INF/classes/META-INF/lcs-spring.xml]: Cannot resolve reference to bean 'com.liferay.lcs.util.LCSConnectionManager' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.lcs.util.LCSConnectionManager' defined in ServletContext resource [/WEB-INF/classes/META-INF/lcs-spring.xml]: Cannot resolve reference to bean 'com.liferay.lcs.service.LCSGatewayService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Er
2018-09-10 23:28:09.998 INFO [main][HotDeployImpl:221] Deploying lcs-portlet from queue
2018-09-10 23:28:10.000 INFO [main][PluginPackageUtil:1001] Reading plugin package for lcs-portlet
2018-09-10 23:28:10.407 ERROR [main][ContextLoader:225] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.lcs.command.CheckHeartbeatCommand' defined in ServletContext resource [/WEB-INF/classes/META-INF/lcs-spring.xml]: Cannot resolve reference to bean 'com.liferay.lcs.util.LCSConnectionManager' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.lcs.util.LCSConnectionManager' defined in ServletContext resource [/WEB-INF/classes/META-INF/lcs-spring.xml]: Cannot resolve reference to bean 'com.liferay.lcs.service.LCSGatewayService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Er
2018-09-10 23:28:09.998 INFO [main][HotDeployImpl:221] Deploying lcs-portlet from queue
2018-09-10 23:28:10.000 INFO [main][PluginPackageUtil:1001] Reading plugin package for lcs-portlet
2018-09-10 23:28:10.407 ERROR [main][ContextLoader:225] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.lcs.command.CheckHeartbeatCommand' defined in ServletContext resource [/WEB-INF/classes/META-INF/lcs-spring.xml]: Cannot resolve reference to bean 'com.liferay.lcs.util.LCSConnectionManager' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.lcs.util.LCSConnectionManager' defined in ServletContext resource [/WEB-INF/classes/META-INF/lcs-spring.xml]: Cannot resolve reference to bean 'com.liferay.lcs.service.LCSGatewayService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Er
Poshi Tests
CPCategories.testcase
AddCategories
AddCategory
AddCategoryProperties
AddCategoryViewableByAnyone
AddCategoryViewableByOwner
AddCategoryViewableBySiteMembers
AddSubcategories
AddSubcategory
2018-08-09 00:43:48.925 INFO [main][HikariDataSource:95] HikariPool-1 - Starting...
2018-08-09 00:43:49.170 INFO [main][HikariDataSource:107] HikariPool-1 - Start completed.
2018-08-09 00:43:49.174 INFO [main][DialectDetector:77] Determine dialect for MySQL 5.7
2018-08-09 00:43:49.414 INFO [main][DialectDetector:155] Found dialect org.hibernate.dialect.MySQLDialect
2018-08-09 00:43:51.051 INFO [main][HikariDataSource:95] HikariPool-2 - Starting...
2018-08-09 00:43:51.060 INFO [main][HikariDataSource:107] HikariPool-2 - Start completed.
2018-08-09 00:43:51.445 INFO [main][BundleStartStopLogger:35] STARTED org.eclipse.osgi_3.10.200.v20150831-0856 [0]
2018-08-09 00:43:52.488 INFO [Start Level: Equinox Container: 607ef646-6d9b-0018-1ba5-c5ef70cf59c6][BundleStartStopLogger:35] STARTED com.liferay.osgi.util_4.0.2 [2]
2018-08-09 00:43:52.495 INFO [Start Level: Equinox Container: 607ef646-6d9b-0018-1ba5-c5ef70cf59c6][BundleStartStopLogger:35] STARTED com.liferay.portal.bundle.blacklist.api_1.0.2 [3]
2018-08-
[exec] Executing commands: curl -X GET -u "test@liferay.com:test" -d "groupId=37241" -d "name='Collection Name'" -d "start=1" -d "end=1" -d "-orderByComparator=" http://localhost:8080/api/jsonws/fragment.fragmentcollection/get-fragment-collections
[exec] Response: {"exception":"No JSON web service action with path /fragment.fragmentcollection/get-fragment-collections and method GET for fragment","throwable":"com.liferay.portal.kernel.jsonwebservice.NoSuchJSONWebServiceException: No JSON web service action with path /fragment.fragmentcollection/get-fragment-collections and method GET for fragment","error":{"message":"No JSON web service action with path /fragment.fragmentcollection/get-fragment-collections and method GET for fragment","type":"com.liferay.portal.kernel.jsonwebservice.NoSuchJSONWebServiceException"}}Finished executing commands.
[exec]
[exec]
[exec] BUILD FAILED: No URL found in statement
[exec] L:\public\master-portal\portal-web\test\functional\com\lifera