<?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: Revit Test Framework improvements in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/revit-test-framework-improvements/m-p/8210672#M48338</link>
    <description>&lt;P&gt;Dear Mark,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your appreciation and sharing this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like a great piece of work to me, very useful indeed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll repost your contribution on The Building Coder, if I may.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Aug 2018 10:48:47 GMT</pubDate>
    <dc:creator>jeremytammik</dc:creator>
    <dc:date>2018-08-20T10:48:47Z</dc:date>
    <item>
      <title>Revit Test Framework improvements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-test-framework-improvements/m-p/8187537#M48337</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are currently developing a pretty elaborate Revit plugin (you can read more about it &lt;A href="https://up.codes/features/ai" target="_blank"&gt;here&lt;/A&gt;). During the course of this work we've ran into many issues (and surely will run into many more) and this forum has helped us resolve many of them.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;We'd like to contribute something back to the community by telling you about the improvements we've made to the awesome RevitTestFramework (RTF) by the Dynamo team.&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/413917"&gt;@jeremytammik&lt;/a&gt;has talked about RTF on his &lt;A href="http://thebuildingcoder.typepad.com/blog/2013/10/the-dynamo-revit-unit-test-framework.html" target="_blank"&gt;blog&lt;/A&gt; in the past so if you're not familiar with it, you can read about it &lt;A href="http://thebuildingcoder.typepad.com/blog/2013/10/the-dynamo-revit-unit-test-framework.html" target="_blank"&gt;here&lt;/A&gt;. It's an invaluable tool if you are developing a Revit addin as it allows you to run integration tests and control Revit in an automated fashion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the RTF hasn't had much development done on it in a while (other than making it compatible with Revit 2019) and as such we found a few things lacking; the biggest such shortcoming was a lack of&amp;nbsp;Nuget package making usage of the RTF on a build server/continuous integration server very difficult. Along the way, we made a few other improvements that I think you will find interesting and useful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;Summary of main changes we've made so far:&lt;/FONT&gt;&lt;BR /&gt;&lt;STRONG&gt;1. Created a &lt;/STRONG&gt;Nuget&lt;STRONG&gt; package&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;you can download it here: &lt;A href="https://www.nuget.org/packages/revittestframework" target="_blank"&gt;https://www.nuget.org/packages/revittestframework&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Added the ability to group tests by the model&lt;/STRONG&gt;&lt;BR /&gt;Opening a new RVT file for each test significantly slows down the execution of the tests. We wanted our Revit tests to run for each pull request our engineers make, so it has to be fast (and reliable).&lt;BR /&gt;The &lt;FONT face="courier new,courier"&gt;groupByModel&lt;/FONT&gt; option significantly improves performance if you have multiple tests that operate on the same model.&lt;BR /&gt;When using &lt;FONT face="courier new,courier"&gt;--groupByModel&lt;/FONT&gt; the RTF will order the tests such that all tests that operate on the same model file are&amp;nbsp;executed sequentially without closing and reopening the model. Naturally, it requires the &lt;FONT face="courier new,courier"&gt;--continuous&lt;/FONT&gt;&amp;nbsp;parameter to be effective.&lt;/P&gt;&lt;P&gt;Also, goes without saying that if your tests leave&amp;nbsp;side-effects on a model which may break&amp;nbsp;a subsequent test this option will not work for you. Luckily for us, none of our tests have side-effects (which, in general, is a good practice).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. Added ability to use wildcards for model filenames&lt;/STRONG&gt;&lt;BR /&gt;We have multiple models which we want to run a particular test on. Today, every time we make a new model we have to copy/paste a unittest with a new model file.&lt;BR /&gt;To make this simpler, you can now specify a wildcard for your model file on a test and RTF will enumerate all files in the directory and run the test on each one. For example:&lt;/P&gt;&lt;PRE&gt;[TestFixture]
public class TestAllModels
{
    [Test, TestModel(@"C:\Models\test_models_2019\*.rvt")]
    public void SomeTest()
    {&lt;BR /&gt;        ...
    }
}&lt;/PRE&gt;&lt;P&gt;will run &lt;FONT face="courier new,courier"&gt;SomeTest&lt;/FONT&gt; on every RVT file it finds under &lt;FONT face="courier new,courier"&gt;C:\Models\test_models_2019&lt;/FONT&gt;.&lt;BR /&gt;One of the ways we use this is for performance testing. All that this test does is measure the speed with which we finish processing a given model. This way, we can run the test suite on each release and assess whether we have significantly regressed our performance from our previous release.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4. Clear messaging &amp;amp; indication of failures&lt;/STRONG&gt;&lt;BR /&gt;Engineers don't love writing tests and they hate debugging tests. Especially, when diagnosing what went wrong is very difficult.&lt;BR /&gt;We wanted to make sure that an engineer could:&lt;BR /&gt;&amp;nbsp; a) look at the log output from a build server and quickly be able to tell what went wrong and where to start debugging&lt;BR /&gt;&amp;nbsp; b) run the test easily with nice UI&amp;nbsp;on their local computer to quickly iterate on a solution to fix the problem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This included:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Clear indication when a model file is not found (prior to that RTF would just silently complete the test suite without errors)&lt;/LI&gt;&lt;LI&gt;Automatically expand failing tests in the UI so that errors are super obvious&lt;/LI&gt;&lt;LI&gt;Have a clear summary at the end of a test run for the number of passed/failed/etc tests. This way you can go grab a&amp;nbsp;coffee while the tests run and know if there were any errors with a quick glance at the summary&lt;/LI&gt;&lt;LI&gt;We utilize categories (e.g. &lt;FONT face="courier new,courier"&gt;[Category("Doors")]&lt;/FONT&gt;) for grouping. But RTF UI didn't show tests without a category, this is now fixed&lt;/LI&gt;&lt;LI&gt;All &lt;FONT face="courier new,courier"&gt;Console.PrintLine()&lt;/FONT&gt; messages from the actual unit tests are now sent back to the RTF server so you can see them in a single contiguous log - yay (this one is my favorite)!&lt;/LI&gt;&lt;LI&gt;Test completion information is displayed in the console as soon as the test itself is completed, RTF used to wait till all tests have finished before showing you the status of all individual tests, now each pass/fail is printed as soon as the test is completed.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;We've also made a bunch of small bug fixes around the stability of the RTF. There is still work to be done on the framework, but we hope you find these changes useful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are working with the Dynamo team to bring all these changes back to the main branch of RTF, but for now, you are welcome to contribute with us&amp;nbsp;in our forked &lt;A href="https://github.com/upcodes/RevitTestFramework" target="_blank"&gt;repo&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark - Engineering at UpCodes&lt;/P&gt;&lt;P&gt;p.s. we are &lt;A href="https://up.codes/careers" target="_blank"&gt;hiring&lt;/A&gt;&amp;nbsp;- if you love building Revit addins&amp;nbsp;please reach out!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 22:33:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-test-framework-improvements/m-p/8187537#M48337</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-08T22:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Revit Test Framework improvements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-test-framework-improvements/m-p/8210672#M48338</link>
      <description>&lt;P&gt;Dear Mark,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your appreciation and sharing this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like a great piece of work to me, very useful indeed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll repost your contribution on The Building Coder, if I may.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 10:48:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-test-framework-improvements/m-p/8210672#M48338</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-08-20T10:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Revit Test Framework improvements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-test-framework-improvements/m-p/8212702#M48339</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/413917"&gt;@jeremytammik&lt;/a&gt;! That would be great, if you don't mind, please attribute these improvements to &lt;A href="https://up.codes/ai" target="_blank"&gt;UpCodes &lt;/A&gt;instead of just me, since&amp;nbsp;this was an effort from our whole team.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;A href="https://up.codes/" target="_blank" rel="nofollow noopener noreferrer"&gt;UpCodes&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;Engineering&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 00:07:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-test-framework-improvements/m-p/8212702#M48339</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-21T00:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Revit Test Framework improvements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-test-framework-improvements/m-p/8213326#M48340</link>
      <description>&lt;P&gt;Dear Mark,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much. Done:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2018/08/revit-unit-test-framework-improvements.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2018/08/revit-unit-test-framework-improvements.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 08:36:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-test-framework-improvements/m-p/8213326#M48340</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-08-21T08:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Revit Test Framework improvements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-test-framework-improvements/m-p/8238723#M48341</link>
      <description>&lt;P&gt;Thank you, Jeremy!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Btw, in case&amp;nbsp;you are interested how we run RTF in our automated CI, you can read the instructions here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/upcodes/RevitTestFramework/blob/mark/Revit2019/docs/using_with_ci.md" target="_blank"&gt;https://github.com/upcodes/RevitTestFramework/blob/mark/Revit2019/docs/using_with_ci.md&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 18:20:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-test-framework-improvements/m-p/8238723#M48341</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-31T18:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Revit Test Framework improvements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-test-framework-improvements/m-p/8250532#M48342</link>
      <description>&lt;P&gt;Dear Mark,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for pointing them out!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Duly noted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 16:53:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-test-framework-improvements/m-p/8250532#M48342</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-09-06T16:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Revit Test Framework improvements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-test-framework-improvements/m-p/9930091#M48343</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I'm very interested in your tools. But it seems that there is too little introduction about how to use the tool. I mean, maybe there are a lot of persons trying the tool, but don't know how to open the door...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe we need something like, say, Getting Started with RTF, step1, 2, 3,... .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;More details, more better&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 16:07:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-test-framework-improvements/m-p/9930091#M48343</guid>
      <dc:creator>哀家爆</dc:creator>
      <dc:date>2020-12-10T16:07:56Z</dc:date>
    </item>
  </channel>
</rss>

