<?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: Support for Nunit for Plugin development in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/support-for-nunit-for-plugin-development/m-p/11600661#M11918</link>
    <description>&lt;P&gt;A complete solution can be found &lt;A href="https://civilwhiz.com/docs/autocad-civil-3d-plugin-unit-test-with-nunit/" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 02 Mar 2025 01:06:20 GMT</pubDate>
    <dc:creator>soonhui</dc:creator>
    <dc:date>2025-03-02T01:06:20Z</dc:date>
    <item>
      <title>Support for Nunit for Plugin development</title>
      <link>https://forums.autodesk.com/t5/net-forum/support-for-nunit-for-plugin-development/m-p/11377146#M11914</link>
      <description>&lt;P&gt;I've developed Autodesk plugins and now I want to test the functionalities using automated tests. And I want to do it from Nunit/Console environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand that you do allow &lt;A href="https://through-the-interface.typepad.com/through_the_interface/2012/02/the-autocad-2013-core-console.html" target="_blank" rel="noopener"&gt;batch script automation&lt;/A&gt;.&amp;nbsp; But this is a poor fit for my purpose because it's just a batch script and thus is impossible to direct manipulate .Net objects. It just makes my testing effort difficult if not impossible. So much so that I won't find the time well-spent.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To do unit testing under current AutoCAD constraints, I can wrap my tests in Commands, and the Netload my dll and call the Commands from the batch script. But the batch script can't handle dialog boxes that require user interaction like 'Yes' or 'No' reply. So how can I proceed then?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Secondly, I need to invent my own &lt;A href="https://docs.nunit.org/articles/nunit/writing-tests/assertions/assertions.html" target="_blank" rel="noopener"&gt;Assert statement&lt;/A&gt; and find a way to interpret it. I also can't make use of the test results aggregation and analytics tools such as &lt;A href="https://marketplace.visualstudio.com/items?itemName=NUnitDevelopers.NUnit3TestAdapter" target="_blank" rel="noopener"&gt;NUnit Test Adapter&lt;/A&gt; to view my test results. &amp;nbsp;I will have to write my own test adapters. These are a huge waste of development time because such a tool/convention already exists and is mature. Why reinvent the wheel?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you allow me to write my test code in Nunit ( and run it successfully), then I can leverage all the standard code development best practices like mocking and MVVM so that I'll get the best automated testing experience. This is important if we want to develop a robust software.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Solution: I've written up a full solution &lt;A href="https://civilwhiz.com/docs/autocad-civil-3d-plugin-unit-test-with-nunit/" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Mar 2025 01:05:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/support-for-nunit-for-plugin-development/m-p/11377146#M11914</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2025-03-02T01:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Support for Nunit for Plugin development</title>
      <link>https://forums.autodesk.com/t5/net-forum/support-for-nunit-for-plugin-development/m-p/11378561#M11915</link>
      <description>&lt;P&gt;I found these pages for you that might help.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/net/how-to-create-unit-testing-for-autocad-add-in/td-p/10724527" target="_blank"&gt;https://forums.autodesk.com/t5/net/how-to-create-unit-testing-for-autocad-add-in/td-p/10724527&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.keanw.com/2013/09/au-2013-class-schedule-preview.html" target="_blank"&gt;https://www.keanw.com/2013/09/au-2013-class-schedule-preview.html&lt;/A&gt; - I was unable to find the class at AU online.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.autodesk.com/autodesk-university/class/Automate-Your-Revit-Add-Testing-Unit-Testing-2019" target="_blank"&gt;https://www.autodesk.com/autodesk-university/class/Automate-Your-Revit-Add-Testing-Unit-Testing-2019&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 15:17:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/support-for-nunit-for-plugin-development/m-p/11378561#M11915</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2022-08-24T15:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Support for Nunit for Plugin development</title>
      <link>https://forums.autodesk.com/t5/net-forum/support-for-nunit-for-plugin-development/m-p/11382297#M11916</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14801"&gt;@Ed__Jobe&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are no native support for Civil 3D test framework, though one can write one based on &lt;A href="https://github.com/DynamoDS/RevitTestFramework" target="_blank" rel="noopener"&gt;RevitTestFramework&lt;/A&gt; and &lt;A href="https://github.com/CADbloke/CADtest" target="_blank" rel="noopener"&gt;CADtest&lt;/A&gt;. &lt;STRIKE&gt;But I expect many months of developer effort on this. And no guarantee that it will work because the underlying architecture of Revit and Civil 3D can be different.&lt;/STRIKE&gt;&amp;nbsp;For&lt;STRONG&gt;&amp;nbsp;CADbloke's CADtest&lt;/STRONG&gt; I tested on Civil 3D 2023 and &lt;STRONG&gt;it seems to work&lt;/STRONG&gt;! Now it's time to see how far it can carry me through.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, since these are just community effort, there is no guarantee that the above framework will always work with future versions. Autodesk should really provide or at least maintain the test frameworks for plugin development ( Autodesk can take a cue from Microsoft by making these frameworks open sourced).&lt;EM&gt; This is&lt;/EM&gt; what engaging community is all about.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 09:38:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/support-for-nunit-for-plugin-development/m-p/11382297#M11916</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2022-08-26T09:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Support for Nunit for Plugin development</title>
      <link>https://forums.autodesk.com/t5/net-forum/support-for-nunit-for-plugin-development/m-p/11417326#M11917</link>
      <description>&lt;P&gt;Here's a good reason why Autodesk &lt;STRONG&gt;&lt;EM&gt;must&lt;/EM&gt;&lt;/STRONG&gt; own this effort.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I tried to use the tool, there were just too many hiccups, undocumented behaviors and even bugs along the way. Often I can't tell which from which. Just take a look at the following issues and &lt;I&gt;try to&amp;nbsp;&lt;/I&gt;tell me whether they are due to my (mis)use of AutoCAD API, or due to bugs in AutoCAD itself:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;A href="https://forums.autodesk.com/t5/civil-3d-customization/side-loading-database-won-t-populate-civilapplication/td-p/11415423" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/civil-3d-customization/side-loading-database-won-t-populate-civilapplication/td-p/11415423&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://forums.autodesk.com/t5/civil-3d-customization/tinsurface-rebuild-crashes-the-whole-civil-3d-application-when/td-p/11422548" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/civil-3d-customization/tinsurface-rebuild-crashes-the-whole-civil-3d-application-when/td-p/11422548&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://forums.autodesk.com/t5/net/running-accoreconsole-exe-with-nunitlite-will-cause/td-p/11407512" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/net/running-accoreconsole-exe-with-nunitlite-will-cause/td-p/11407512&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I bet no one can, maybe except Autodesk developers, which who don't seem to frequent the forum. OK Autodesk does have paid employees patrolling the forums but they are community managers who are not technical enough to handle the so many issues here. We have to fend off for ourselves!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the very least, Autodesk should start with answering issues in the forum seriously without relying on unpaid volunteers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 04:33:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/support-for-nunit-for-plugin-development/m-p/11417326#M11917</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2022-09-15T04:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Support for Nunit for Plugin development</title>
      <link>https://forums.autodesk.com/t5/net-forum/support-for-nunit-for-plugin-development/m-p/11600661#M11918</link>
      <description>&lt;P&gt;A complete solution can be found &lt;A href="https://civilwhiz.com/docs/autocad-civil-3d-plugin-unit-test-with-nunit/" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Mar 2025 01:06:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/support-for-nunit-for-plugin-development/m-p/11600661#M11918</guid>
      <dc:creator>soonhui</dc:creator>
      <dc:date>2025-03-02T01:06:20Z</dc:date>
    </item>
  </channel>
</rss>

