Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify tests that make real requests and assert using response #9785

Closed
dsilvam opened this issue Sep 13, 2016 · 4 comments
Closed

Identify tests that make real requests and assert using response #9785

dsilvam opened this issue Sep 13, 2016 · 4 comments

Comments

@dsilvam
Copy link
Contributor

dsilvam commented Sep 13, 2016

We need to put together a list of tests that make real requests and assert using the obtained response.

Context

Running Integration Tests outside the container.

@dsilvam dsilvam added this to the 3.7.0 milestone Sep 13, 2016
@nollymar nollymar self-assigned this Sep 14, 2016
@nollymar
Copy link
Contributor

The following classes make real requests:

  • com.dotcms.csspreproc.CSSPreProcessServletTest.java
  • com.dotcms.csspreproc.LessCompilerTest.java
  • com.dotcms.csspreproc.SassCompilerTest.java
  • com.dotcms.publisher.ajax.RemotePublishAjaxActionTest.java
  • com.dotcms.rest.ContentResourceTest.java
  • com.dotcms.rest.RoleResourceTest.java
  • com.dotmarketing.business.UserAPITest.java
  • com.dotmarketing.portlets.contentlet.business.FileAssetTest.java
  • com.dotmarketing.portlets.rules.ApiRequest.java
  • com.dotmarketing.portlets.rules.RulesUnderPageAssetsFTest.java
  • com.dotmarketing.portlets.rules.actionlet.PersonaActionletFTest.java
  • com.dotmarketing.portlets.rules.actionlet.SetResponseHeaderActionletFTest.java
  • com.dotmarketing.portlets.rules.actionlet.SetSessionAttributeActionletFTest.java
  • com.dotmarketing.portlets.rules.actionlet.VisitorsTagsActionletFTest.java
  • com.dotmarketing.portlets.rules.business.RulesAPIFTest.java
  • com.dotmarketing.portlets.structure.business.URLMapTest.java
  • com.dotmarketing.portlets.workflows.business.WorkflowAPITest.java
  • com.dotmarketing.sitesearch.ajax.SiteSearchAjaxActionTest.java
  • com.dotmarketing.webdav.WebDavTest.java
  • com.dotcms.rest.WebResourceTest.java
  • com.dotcms.rest.api.FunctionalTestConfig.java
  • com.dotmarketing.portlets.rules.conditionlet.ConditionletFTest.java

@nollymar
Copy link
Contributor

Additional considerations:

  • There are several ways to mock HttpServletRequests and many of them duplicate code already defined in ConfigTestHelper. We should define an standard for integration and unit tests in general.
  • The code in ApiRequest.java is duplicated. Even, ApiRequest is defined as a public class, but it exists as private class as well.
  • The existing logic in ApiRequest should be moved to ConfigTestHelper.
  • Classes ApiRequest and ServletTestRunner might be deleted.

@nollymar nollymar removed their assignment Sep 14, 2016
@dsilvam
Copy link
Contributor Author

dsilvam commented Sep 15, 2016

@dsilvam dsilvam modified the milestones: 3.7.0, Rex Current Sep 28, 2016
@dsilvam
Copy link
Contributor Author

dsilvam commented Oct 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants