[MAGNOLIA-3740] Consolidate various testing utilities into a single testing framework Created: 23/Jun/11  Updated: 03/Dec/13  Resolved: 03/Dec/13

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 4.4.4
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Rob Blake Assignee: Philipp Bärfuss
Resolution: Outdated Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

Customer use case

I've recently been developing a service that uses Magnolia as the underlying content store. I have a small API that is exposed as a REST service that allows me to retrieve certain pieces of content programatically in my application.

As part of the development process, I wanted to test my service against a "real" Magnolia instance not just using Mock objects. This is to ensure that I am using the Magnolia API correctly. I wanted this to be something that I could run as a unit test to make the process of testing and fixing bugs efficient.

Problem

There are a number of test utilities that make this possible. In particular I have made good use of info.magnolia.test.RepositoryTestCase. There are also a number of other utilities that have been developed to solve problems associated with writing this type of unit test. In my case, info.magnolia.module.templatingkit.util.SureFireModuleManager helps to work around a known problem with classloading when using the Maven Surefire plugin to run my unit tests.

The problem is that these utilities are scattered throughout different projects. It makes them hard to locate, and it also makes the dependencies for my tests overly complicated.

Suggestion

Consolidate all of the various testing utilities into a single test framework, making it easier for customers to test their applications against a "real" Magnolia instance from unit tests.



 Comments   
Comment by Magnolia International [ 23/Jun/11 ]

Agreed with the need for consolidation, although your use-case sounds like it's calling for integration tests.

We could also think about providing an ITest framework where one could run stuff "in" Magnolia, without necessarily requiring firing up an app server. (after all, we do this in magnolia-tools)

Generated at Mon Feb 12 03:49:14 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.