The Alfresco In-Process SDK is based on Apache Maven, includes support for rapid and standard development, testing, packaging, versioning and release of your Alfresco integration and extension projects
Apache License 2.0
186
stars
113
forks
source link
Cannot execute tests declared in abstract classes #495
We are currently migrating our projects from SDK 2.1.1 to SDK 3.0.1 to prepare an Alfresco migration from v5.0.1 to v5.2.
In our projects we have a lot of integration tests and are trying to make them pass using the AlfrescoTestRunner.
I'm submitting a ... (check one with "x")
Assume we have a test Class B which extends an abstract class A. A has a test method methodA.
Expected Behavior
When running test B#methodA using the AlfrescoTestRunner, the runner should instantiate the class being executed, i.e B.
Current Behavior
The remote AlfrescoTestRunner tries to instantiate the class A instead of B. Since A is abstract, an InstantiationException is thrown \:
RunTestWebScript: Start executing ... RunTestWebScript: clazzAndMethod = me.tartard.alfresco.demo.PR491.AbstractIT#test RunTestWebScript: [clazz=me.tartard.alfresco.demo.PR491.AbstractIT][method=test] RunTestWebScript: model = {result=FAILURE, throwables=[rO0ABXNyACBqYXZhLmxhbmcuSW5zdGFudGlhdGlvbkV4Y2VwdGlvborYPidN1YWKAgAAeHIAJmphdmE ...], failures=[test(me.tartard.alfresco.demo.PR491.AbstractIT): null], test=me.tartard.alfresco.demo.PR491.AbstractIT#test#test, ignoreCount=0, wasSuccessful=false, runTime=32, runCount=1, resultObject=org.junit.runner .Result@7ae67e6c, failureCount=1} RunTestWebScript: Stopped executing Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.104 sec <<< FAILURE! - in me.tartard.alfresco.demo.PR491.ChildIT test(me.tartard.alfresco.demo.PR491.ChildIT) Time elapsed: 0.424 sec <<< ERROR! java.lang.InstantiationException
Results :
Tests in error: ChildIT.test » Instantiation
Possible Solution
Merge Pull Request #491
Steps to Reproduce (for bugs)
Context
We are currently migrating our projects from SDK 2.1.1 to SDK 3.0.1 to prepare an Alfresco migration from v5.0.1 to v5.2. In our projects we have a lot of integration tests and are trying to make them pass using the AlfrescoTestRunner.
Your Environment
Additional information