<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: JUnit test and Records Management dependencies in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/junit-test-and-records-management-dependencies/m-p/70734#M23166</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extending RM isn't something I'm very familiar with (because I work directly on it), however a couple of things stand out to me.&amp;nbsp; Firstly the exception message is bizarre - usually the NoSuchBeanDefinition will name a particular bean, but your error message looks like it's trying to add a bean called "Can't find bean 'simpleMappingExceptionResolver' to be extended."&amp;nbsp; I've no idea how this could happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly did you consider writing tests in the same style as our integration tests? (i.e. our tests in test/java rather than unit-test/java)&amp;nbsp; We extend an abstract class BaseRMTestCase, which includes setting up the application context.&amp;nbsp; More recently we have moved away from application context tests to focus on end-to-end REST API tests, but I know that doesn't always cover all cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a minimal project that reproduces this issue then perhaps you could put it on GitHub and we could try it out? I'm not sure what the @Remote annotation is for - are you trying to run the tests against a server in a separate jvm rather than setting up the application context as part of the test?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 May 2018 08:08:38 GMT</pubDate>
    <dc:creator>tpage</dc:creator>
    <dc:date>2018-05-16T08:08:38Z</dc:date>
    <item>
      <title>JUnit test and Records Management dependencies</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/junit-test-and-records-management-dependencies/m-p/70733#M23165</link>
      <description>I have a simple working JUnit test:@RunWith(SpringJUnit4ClassRunner.class)@Remote(runnerClass = SpringJUnit4ClassRunner.class)@ContextConfiguration("classpath:alfresco/application-context.xml")public class MySimpleTest {&amp;nbsp;&amp;nbsp;&amp;nbsp; @Test&amp;nbsp;&amp;nbsp;&amp;nbsp; public void contextLoad() {&amp;nbsp;&amp;nbsp;&amp;nbsp; }}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍</description>
      <pubDate>Wed, 02 May 2018 14:33:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/junit-test-and-records-management-dependencies/m-p/70733#M23165</guid>
      <dc:creator>mkczyk</dc:creator>
      <dc:date>2018-05-02T14:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: JUnit test and Records Management dependencies</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/junit-test-and-records-management-dependencies/m-p/70734#M23166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extending RM isn't something I'm very familiar with (because I work directly on it), however a couple of things stand out to me.&amp;nbsp; Firstly the exception message is bizarre - usually the NoSuchBeanDefinition will name a particular bean, but your error message looks like it's trying to add a bean called "Can't find bean 'simpleMappingExceptionResolver' to be extended."&amp;nbsp; I've no idea how this could happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly did you consider writing tests in the same style as our integration tests? (i.e. our tests in test/java rather than unit-test/java)&amp;nbsp; We extend an abstract class BaseRMTestCase, which includes setting up the application context.&amp;nbsp; More recently we have moved away from application context tests to focus on end-to-end REST API tests, but I know that doesn't always cover all cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a minimal project that reproduces this issue then perhaps you could put it on GitHub and we could try it out? I'm not sure what the @Remote annotation is for - are you trying to run the tests against a server in a separate jvm rather than setting up the application context as part of the test?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 08:08:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/junit-test-and-records-management-dependencies/m-p/70734#M23166</guid>
      <dc:creator>tpage</dc:creator>
      <dc:date>2018-05-16T08:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: JUnit test and Records Management dependencies</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/junit-test-and-records-management-dependencies/m-p/70735#M23167</link>
      <description>&lt;P&gt;Hi, I am facing same type issue in APS unit test, can you help?&lt;/P&gt;&lt;P&gt;&lt;A href="https://hub.alfresco.com/t5/alfresco-process-services/javadelegate-unit-test/m-p/300548#M6686" target="_blank" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-process-services/javadelegate-unit-test/m-p/300548#M6686&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 05:20:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/junit-test-and-records-management-dependencies/m-p/70735#M23167</guid>
      <dc:creator>sp2</dc:creator>
      <dc:date>2020-08-04T05:20:39Z</dc:date>
    </item>
  </channel>
</rss>

