{"id":19378736,"url":"https://github.com/dynamods/revittestframework","last_synced_at":"2025-05-12T03:31:39.820Z","repository":{"id":16822407,"uuid":"19581628","full_name":"DynamoDS/RevitTestFramework","owner":"DynamoDS","description":"Unit Testing on Revit","archived":false,"fork":false,"pushed_at":"2023-06-05T14:16:02.000Z","size":46916,"stargazers_count":128,"open_issues_count":25,"forks_count":88,"subscribers_count":45,"default_branch":"Revit2019","last_synced_at":"2025-05-01T13:17:32.620Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DynamoDS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"licenses.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-05-08T17:03:50.000Z","updated_at":"2025-02-13T09:46:24.000Z","dependencies_parsed_at":"2024-06-21T01:05:58.498Z","dependency_job_id":"755835db-6a43-40c9-b74b-23a30116a6b6","html_url":"https://github.com/DynamoDS/RevitTestFramework","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DynamoDS%2FRevitTestFramework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DynamoDS%2FRevitTestFramework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DynamoDS%2FRevitTestFramework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DynamoDS%2FRevitTestFramework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DynamoDS","download_url":"https://codeload.github.com/DynamoDS/RevitTestFramework/tar.gz/refs/heads/Revit2019","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253668049,"owners_count":21944967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T09:06:57.795Z","updated_at":"2025-05-12T03:31:38.677Z","avatar_url":"https://github.com/DynamoDS.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RevitTestFramework\n\nThe Revit Test Framework (RTF) allows you to conduct remote unit testing on Revit. RTF takes care of creating a journal file for running revit which can specify a model to start Revit, and a specific test or fixture of tests to run. You can even specify a model to open before testing and RTF will do that as well. \n\n[![Build status](https://ci.appveyor.com/api/projects/status/oqd23280efmaimmm/branch/mark/Revit2019?svg=true)](https://ci.appveyor.com/project/marchello2000/revittestframework/branch/mark/Revit2019) \n[![NuGet](https://img.shields.io/nuget/v/revittestframework.svg)](https://www.nuget.org/packages/revittestframework)\n\n## Applications\n\nThere are two ways to run RTF:\n* **RevitTestFrameworkConsole.exe**  \n   A Console application to run test from a command line\n* **RevitTestFrameworkGUI.exe**  \n   A GUI application that allows easy selection of tests to run and check results\n\nBoth options run the tests in the same way\n\n### RevitTestFrameworkConsole.exe  \nA console application which allows running RTF without a user interface. If you'd like to learn more about the command line options for RTF, you can simply type \"RevitTestFrameworkConsole -h\" and you'll get something like this:\n```\nOptions:   \n\n         --dir=[VALUE]          The full path to the working directory. The working directory is the directory in which RTF will generate the journal and the addin to Run Revit. Revit's run-by-journal capability requires that all addins which need to be loaded are in the same directory as the journal file. So, if you're testing other addins on top of Revit using RTF, you'll need to put those addins in whatever directory you specify as the working directory.  \n    -a,  --assembly=[VALUE]     The full path to the assembly containing your tests.  \n    -r,  --results=[VALUE]      This is the full path to an .xml file that will contain the results. \n    -f,  --fixture=[VALUE]      The full name (with namespace) of a test fixture to run. If no fixture, no category and no test names are specified, RTF will run all tests in the assembly.(OPTIONAL)  \n    -t,  --testName[=VALUE]     The name of a test to run. If no fixture, no category and no test names are specified, RTF will run all tests in the assembly. (OPTIONAL)    \n         --category[=VALUE]     The name of a test category to run. If no fixture, no category and no test names are specified, RTF will run all tests in the assembly. (OPTIONAL)   \n         --exclude[=VALUE]      The name of a test category to exclude. This has a higher priortiy than other settings. If a specified category is set here, any test cases that belongs to that category will not be run. (OPTIONAL)  \n    -c,  --concatenate          Concatenate the results from this run of RTF with an existing results file if one exists at the path specified. The default behavior is to replace the existing results file. (OPTIONAL)  \n         --revit[=VALUE]        The Revit executable to be used for testing. If no executable is specified, RTF will use the first version of Revit that is found on the machine using the RevitAddinUtility. (OPTIONAL)  \n         --copyAddins           Specify whether to copy the addins from the Revit folder to the current working directory. Copying the addins from the Revit folder will cause the test process to simulate the typical setup on your machine. (OPTIONAL)  \n         --dry                  Conduct a dry run. (OPTIONAL)  \n    -x,  --clean                Cleanup journal files after test completion. (OPTIONAL)   \n         --continuous           Run all selected tests in one Revit session. (OPTIONAL)  \n         --groupByModel         Run tests with same model without reopening the model for faster execution, requires --continuous. (OPTIONAL)\n         --time                 The time, in milliseconds, after which RTF will close the testing process automatically. (OPTIONAL)  \n    -d,  --debug                Should RTF attempt to attach to a debugger?. (OPTIONAL)  \n    -h,  --help                 Show this message and exit. (OPTIONAL)  \n```\n\nAs an example, the following command:\n```\nRevitTestFrameworkConsole.exe --dir C:\\MyTestDir -a MyTest.dll -r MyTestResults.xml -revit:\"C:\\Program Files\\Autodesk\\Revit 2019\\Revit.exe\" --continuous\n```\nwill execute all tests in `MyTest.dll` located in `C:\\MyTestDir` and place all results in `MyTestResults.xml` (in the same folder). It will use Revit 2019 as specified and will run all tests without shutting down Revit.\n\nThe results of the run as well as any `Console.WriteLine` or `Console.Error.WriteLine` from test will be shown in the command window and written ot the results xml file, e.g.:\n\n```\nReading assembly: D:\\MyTestDir\\MyTest.dll\nLoaded test: Name: UnitTest1, Model Path: D:\\MyTestDir\\MyModel1.rvt (D:\\MyTestDir\\MyModel1.rvt)\nLoaded test: Name: UnitTest2, Model Path: D:\\MyTestDir\\MyModel2.rvt (D:\\MyTestDir\\MyModel2.rvt)\nRunning D:\\Projects\\UpCodes\\upcodes_revit\\Tests\\2019\\bin\\Debug\\RTF_Batch_Test.txt\nRunning UnitTest1 in BasicTests\nSuccess: UnitTest1 in BasicTests\n\nRunning UnitTest2 in BasicTests\nSuccess: UnitTest2 in BasicTests\n\nWaiting for Revit to terminate\nWARNING: One or more journal files could not be deleted.\n```\n\nThe warning about some journal files not being deleted can be safely ignored.\n\n### RevitTestFrameworkGUI.exe   \nProvides a visual interface for you to choose tests from a treeview and to visualize the results of the tests as they are run. The same settings provided in the command line argument help above are available in the UI. The UI also allows you to save your testing session.\n\nThe input fields to set the test assembly, the working directory, and the results file, as well as the tree view where available tests are displayed, support dragging and dropping of files and folders.\n\nRevitTestFrameworkGUI.exe can also take an argument for the test assembly path and will automatically fill all values on start so you can just hit `Run`.\n\n![RTF](images/RTF_UI.PNG) \n\n`File` - For saving and loading your local RTF config.  \n`Test Assembly` - Path to assembly containing the tests to run. E.g. RevitNodesTests.dll, RevitSystemTests.dll, RevitServicesTests.dll.  \n`Results File Path` - Path to the xml file containing the tests results. If it's an existing file, RTF will replace it.  \n`Working Directory` - Path to where the testing Revit files are.  \n`Additional Resolution Directories` - Path to find Dynamo Core location when it is not set in the `Dynamo.Config` in DynamoRevit bin folder.  \n`Debug` - Check this if you decide to launch a debug session.\n`Timeout` - in milliseconds, the maximum time for a test to run. If a test doesn't finish in this time, Revit will be forcefully terminated and new test session without the offending test will start (the offending test will be marked as `timedout`).  \n`Continuous` - same as above, run tests without restarting Revit for each test.  \n`GroupByModel` - same as above, run tests with the same model without reopening the model.  \n\n## Results  \n\nThe output file from a test run is an nunit-formatted results file compatible with many CI systems.  \nFor documentation how to use RTF inside a CI system, see [this guide](docs/using_with_ci.md)\n\n## Revit Versions\n\nThis repo maintains branches to track the two most recently released versions of Revit and one un-released version of Revit. When new versions of Revit are released, branches tracking the oldest version of Revit supported will no longer be maintained. For example, when Revit 2016 is released, the Revit 2014 branch of RTF will no longer be maintained.  \nWhen testing, you should run the version of RTF corresponding to the version of Revit you are running. This will ensure that tests you have created, based on one Revit API, will correspond to the version of the API running on Revit.  \nHowever, the current version of RTF works and can be used to test within Revit 2017, 2018, and 2019.\n\n## Build Configurations\n\nIf you want to build RTF on a machine that don't have a Revit installed, you can put the Revit API related dlls under folder lib\\Revit $(RevitVersionNumber)\\net452 which was defined in CS.props. The build can be success, but if you want to run RTF, you still need a machine with Revit installed.\n\n## License\n\nCopyright 2014 Autodesk\n\nLicensed under The MIT License; you may not use this file except in compliance with the License. You may obtain a copy of the License at\n\nhttp://opensource.org/licenses/MIT\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynamods%2Frevittestframework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdynamods%2Frevittestframework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynamods%2Frevittestframework/lists"}