From 68103933c76a909a974b159f71c3b6abb4be4624 Mon Sep 17 00:00:00 2001 From: Fusneica-FlorentinCristian Date: Mon, 6 Apr 2026 17:02:10 +0300 Subject: [PATCH 01/24] REVIT-238057: Add OOTB D4R sample tests with SetupUnzip Add OOTB_D4R_SampleTests.cs to RevitIntegrationTests with: - SetupUnzip() that resolves .dyn files from: 1. Previously-extracted D4RSamples folder 2. revit-d4r-content-samples-*-net10.zip in DynamoForRevit\samples 3. Already-deployed DynamoForRevit\samples\en-US\Revit (fallback) - Smoke tests for all 10 OOTB sample scripts - Geometry tests (Points, Curves, Solids, Surfaces) use empty.rfa - Revit-element tests use DynamoSample_2021.rvt --- .../OOTB_D4R_SampleTests.cs | 233 ++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644 test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs new file mode 100644 index 000000000..355e679bd --- /dev/null +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -0,0 +1,233 @@ +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Reflection; +using NUnit.Framework; +using RevitTestServices; +using RTF.Framework; + +namespace RevitSystemTests +{ + /// + /// Tests for the Out-of-the-Box (OOTB) D4R sample scripts shipped as part of the + /// revit-d4r-content-samples artifact. + /// + /// The .dyn files are resolved at runtime via which checks, + /// in order: + /// 1. An already-extracted D4RSamples folder next to the installed samples directory. + /// 2. A revit-d4r-content-samples-*-net10.zip in the installed samples directory. + /// 3. The already-deployed samples at DynamoForRevit\samples\en-US\Revit\. + /// + [TestFixture] + class OOTB_D4R_Tests : RevitSystemTestBase + { + /// + /// Locates an OOTB sample .dyn file by checking the standard deployment locations + /// used for the revit-d4r-content-samples artifact. + /// + /// + /// The filename of the .dyn script as shipped, e.g. "Revit Color.dyn". + /// + /// Absolute path to the .dyn file. + public static string SetupUnzip(string scriptFileName) + { + string assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + + // When deployed to Revit: + // assemblyDir = DynamoForRevit\Revit\ + // parentDir = DynamoForRevit\ + string parentDir = Path.GetDirectoryName(assemblyDir); + + string samplesFolder = Path.Combine(parentDir, "samples"); + string extractedSamplesPath = Path.Combine(samplesFolder, "D4RSamples"); + string installedSamplesPath = Path.Combine(samplesFolder, @"en-US\Revit"); + + // Priority 1: zip was already extracted from a previous test run + if (Directory.Exists(extractedSamplesPath)) + { + return Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); + } + + // Priority 2: zip file is present — extract on first use + if (Directory.Exists(samplesFolder)) + { + var zipFiles = Directory.GetFiles( + samplesFolder, + "revit-d4r-content-samples-*-net10.zip"); + + if (zipFiles.Length > 0) + { + ZipFile.ExtractToDirectory(zipFiles[0], extractedSamplesPath); + return Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); + } + } + + // Priority 3: already-deployed samples (standard Revit install) + if (Directory.Exists(installedSamplesPath)) + { + return Path.Combine(installedSamplesPath, scriptFileName); + } + + // Provide a useful diagnostic message to help locate the issue + if (Directory.Exists(samplesFolder)) + { + var entries = Directory.EnumerateFileSystemEntries(samplesFolder) + .Select(e => $"\n {e}"); + throw new DirectoryNotFoundException( + $"Cannot locate OOTB D4R sample scripts.\n" + + $"Checked samples folder: {samplesFolder}\n" + + $"Contents:{string.Concat(entries)}"); + } + else + { + var parentEntries = Directory.Exists(parentDir) + ? Directory.EnumerateDirectories(parentDir).Select(e => $"\n {e}") + : Enumerable.Empty(); + throw new DirectoryNotFoundException( + $"Cannot locate OOTB D4R sample scripts.\n" + + $"Expected samples folder not found: {samplesFolder}\n" + + $"Parent dir contents:{string.Concat(parentEntries)}"); + } + } + + [Test, Category("SmokeTests")] + [TestModel(@".\empty.rfa")] + public void Revit_Geometry_Creation_Points() + { + string samplePath = SetupUnzip("Revit Geometry Creation Points.dyn"); + string testPath = Path.GetFullPath(samplePath); + + ViewModel.OpenCommand.Execute(testPath); + + AssertNoDummyNodes(); + + RunCurrentModel(); + } + + [Test, Category("SmokeTests")] + [TestModel(@".\empty.rfa")] + public void Revit_Geometry_Creation_Curves() + { + string samplePath = SetupUnzip("Revit Geometry Creation Curves.dyn"); + string testPath = Path.GetFullPath(samplePath); + + ViewModel.OpenCommand.Execute(testPath); + + AssertNoDummyNodes(); + + RunCurrentModel(); + } + + [Test, Category("SmokeTests")] + [TestModel(@".\empty.rfa")] + public void Revit_Geometry_Creation_Solids() + { + string samplePath = SetupUnzip("Revit Geometry Creation Solids.dyn"); + string testPath = Path.GetFullPath(samplePath); + + ViewModel.OpenCommand.Execute(testPath); + + AssertNoDummyNodes(); + + RunCurrentModel(); + } + + [Test, Category("SmokeTests")] + [TestModel(@".\empty.rfa")] + public void Revit_Geometry_Creation_Surfaces() + { + string samplePath = SetupUnzip("Revit Geometry Creation Surfaces.dyn"); + string testPath = Path.GetFullPath(samplePath); + + ViewModel.OpenCommand.Execute(testPath); + + AssertNoDummyNodes(); + + RunCurrentModel(); + } + + [Test, Category("SmokeTests")] + [TestModel(@".\Samples\DynamoSample_2021.rvt")] + public void Revit_Adaptive_Component_Placement() + { + string samplePath = SetupUnzip("Revit Adaptive Component Placement.dyn"); + string testPath = Path.GetFullPath(samplePath); + + ViewModel.OpenCommand.Execute(testPath); + + AssertNoDummyNodes(); + + RunCurrentModel(); + } + + [Test, Category("SmokeTests")] + [TestModel(@".\Samples\DynamoSample_2021.rvt")] + public void Revit_Color() + { + string samplePath = SetupUnzip("Revit Color.dyn"); + string testPath = Path.GetFullPath(samplePath); + + ViewModel.OpenCommand.Execute(testPath); + + AssertNoDummyNodes(); + + RunCurrentModel(); + } + + [Test, Category("SmokeTests")] + [TestModel(@".\Samples\DynamoSample_2021.rvt")] + public void Revit_Floors_and_Framing() + { + string samplePath = SetupUnzip("Revit Floors and Framing.dyn"); + string testPath = Path.GetFullPath(samplePath); + + ViewModel.OpenCommand.Execute(testPath); + + AssertNoDummyNodes(); + + RunCurrentModel(); + } + + [Test, Category("SmokeTests")] + [TestModel(@".\Samples\DynamoSample_2021.rvt")] + public void Revit_Import_Solid() + { + string samplePath = SetupUnzip("Revit Import Solid.dyn"); + string testPath = Path.GetFullPath(samplePath); + + ViewModel.OpenCommand.Execute(testPath); + + AssertNoDummyNodes(); + + RunCurrentModel(); + } + + [Test, Category("SmokeTests")] + [TestModel(@".\Samples\DynamoSample_2021.rvt")] + public void Revit_Place_Families_By_Level_Set_Parameters() + { + string samplePath = SetupUnzip("Revit Place Families By Level Set Parameters.dyn"); + string testPath = Path.GetFullPath(samplePath); + + ViewModel.OpenCommand.Execute(testPath); + + AssertNoDummyNodes(); + + RunCurrentModel(); + } + + [Test, Category("SmokeTests")] + [TestModel(@".\Samples\DynamoSample_2021.rvt")] + public void Revit_Structural_Framing() + { + string samplePath = SetupUnzip("Revit Structural Framing.dyn"); + string testPath = Path.GetFullPath(samplePath); + + ViewModel.OpenCommand.Execute(testPath); + + AssertNoDummyNodes(); + + RunCurrentModel(); + } + } +} From 1cdaf6154a43461d2ec638792f7390816ca49572 Mon Sep 17 00:00:00 2001 From: Fusneica-FlorentinCristian Date: Thu, 23 Apr 2026 16:24:55 +0300 Subject: [PATCH 02/24] =?UTF-8?q?REVIT-238057:=20Address=20PR=20review=20?= =?UTF-8?q?=E2=80=94=20refactor=20OOTB=5FD4R=5FTests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Make SetupUnzip private (not needed outside the fixture) - Add File.Exists checks on resolved paths before returning - Throw on multiple matching zip files (ambiguous source) - Extract OpenAndRunSample helper to reduce duplication in 10 tests - Use FileNotFoundException for missing scripts (more specific) --- .../OOTB_D4R_SampleTests.cs | 141 ++++++------------ 1 file changed, 46 insertions(+), 95 deletions(-) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index 355e679bd..4d9de8748 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -21,15 +21,7 @@ namespace RevitSystemTests [TestFixture] class OOTB_D4R_Tests : RevitSystemTestBase { - /// - /// Locates an OOTB sample .dyn file by checking the standard deployment locations - /// used for the revit-d4r-content-samples artifact. - /// - /// - /// The filename of the .dyn script as shipped, e.g. "Revit Color.dyn". - /// - /// Absolute path to the .dyn file. - public static string SetupUnzip(string scriptFileName) + private static string SetupUnzip(string scriptFileName) { string assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); @@ -45,27 +37,44 @@ public static string SetupUnzip(string scriptFileName) // Priority 1: zip was already extracted from a previous test run if (Directory.Exists(extractedSamplesPath)) { - return Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); + var resolved = Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); + if (File.Exists(resolved)) + return resolved; } // Priority 2: zip file is present — extract on first use if (Directory.Exists(samplesFolder)) { var zipFiles = Directory.GetFiles( - samplesFolder, - "revit-d4r-content-samples-*-net10.zip"); + samplesFolder, + "revit-d4r-content-samples-*-net10.zip") + .OrderBy(path => path) + .ToArray(); - if (zipFiles.Length > 0) + if (zipFiles.Length > 1) + { + var matches = zipFiles.Select(path => $"\n {path}"); + throw new InvalidOperationException( + $"Multiple revit-d4r-content-samples archives were found in '{samplesFolder}', " + + $"so the OOTB D4R sample source is ambiguous. Ensure exactly one matching zip is present." + + $"{string.Concat(matches)}"); + } + + if (zipFiles.Length == 1) { ZipFile.ExtractToDirectory(zipFiles[0], extractedSamplesPath); - return Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); + var resolved = Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); + if (File.Exists(resolved)) + return resolved; } } // Priority 3: already-deployed samples (standard Revit install) if (Directory.Exists(installedSamplesPath)) { - return Path.Combine(installedSamplesPath, scriptFileName); + var resolved = Path.Combine(installedSamplesPath, scriptFileName); + if (File.Exists(resolved)) + return resolved; } // Provide a useful diagnostic message to help locate the issue @@ -73,8 +82,8 @@ public static string SetupUnzip(string scriptFileName) { var entries = Directory.EnumerateFileSystemEntries(samplesFolder) .Select(e => $"\n {e}"); - throw new DirectoryNotFoundException( - $"Cannot locate OOTB D4R sample scripts.\n" + + throw new FileNotFoundException( + $"Cannot locate OOTB D4R sample script '{scriptFileName}'.\n" + $"Checked samples folder: {samplesFolder}\n" + $"Contents:{string.Concat(entries)}"); } @@ -83,18 +92,16 @@ public static string SetupUnzip(string scriptFileName) var parentEntries = Directory.Exists(parentDir) ? Directory.EnumerateDirectories(parentDir).Select(e => $"\n {e}") : Enumerable.Empty(); - throw new DirectoryNotFoundException( - $"Cannot locate OOTB D4R sample scripts.\n" + + throw new FileNotFoundException( + $"Cannot locate OOTB D4R sample script '{scriptFileName}'.\n" + $"Expected samples folder not found: {samplesFolder}\n" + $"Parent dir contents:{string.Concat(parentEntries)}"); } } - [Test, Category("SmokeTests")] - [TestModel(@".\empty.rfa")] - public void Revit_Geometry_Creation_Points() + private void OpenAndRunSample(string scriptFileName) { - string samplePath = SetupUnzip("Revit Geometry Creation Points.dyn"); + string samplePath = SetupUnzip(scriptFileName); string testPath = Path.GetFullPath(samplePath); ViewModel.OpenCommand.Execute(testPath); @@ -106,128 +113,72 @@ public void Revit_Geometry_Creation_Points() [Test, Category("SmokeTests")] [TestModel(@".\empty.rfa")] - public void Revit_Geometry_Creation_Curves() + public void Revit_Geometry_Creation_Points() { - string samplePath = SetupUnzip("Revit Geometry Creation Curves.dyn"); - string testPath = Path.GetFullPath(samplePath); - - ViewModel.OpenCommand.Execute(testPath); - - AssertNoDummyNodes(); + OpenAndRunSample("Revit Geometry Creation Points.dyn"); + } - RunCurrentModel(); + [Test, Category("SmokeTests")] + [TestModel(@".\empty.rfa")] + public void Revit_Geometry_Creation_Curves() + { + OpenAndRunSample("Revit Geometry Creation Curves.dyn"); } [Test, Category("SmokeTests")] [TestModel(@".\empty.rfa")] public void Revit_Geometry_Creation_Solids() { - string samplePath = SetupUnzip("Revit Geometry Creation Solids.dyn"); - string testPath = Path.GetFullPath(samplePath); - - ViewModel.OpenCommand.Execute(testPath); - - AssertNoDummyNodes(); - - RunCurrentModel(); + OpenAndRunSample("Revit Geometry Creation Solids.dyn"); } [Test, Category("SmokeTests")] [TestModel(@".\empty.rfa")] public void Revit_Geometry_Creation_Surfaces() { - string samplePath = SetupUnzip("Revit Geometry Creation Surfaces.dyn"); - string testPath = Path.GetFullPath(samplePath); - - ViewModel.OpenCommand.Execute(testPath); - - AssertNoDummyNodes(); - - RunCurrentModel(); + OpenAndRunSample("Revit Geometry Creation Surfaces.dyn"); } [Test, Category("SmokeTests")] [TestModel(@".\Samples\DynamoSample_2021.rvt")] public void Revit_Adaptive_Component_Placement() { - string samplePath = SetupUnzip("Revit Adaptive Component Placement.dyn"); - string testPath = Path.GetFullPath(samplePath); - - ViewModel.OpenCommand.Execute(testPath); - - AssertNoDummyNodes(); - - RunCurrentModel(); + OpenAndRunSample("Revit Adaptive Component Placement.dyn"); } [Test, Category("SmokeTests")] [TestModel(@".\Samples\DynamoSample_2021.rvt")] public void Revit_Color() { - string samplePath = SetupUnzip("Revit Color.dyn"); - string testPath = Path.GetFullPath(samplePath); - - ViewModel.OpenCommand.Execute(testPath); - - AssertNoDummyNodes(); - - RunCurrentModel(); + OpenAndRunSample("Revit Color.dyn"); } [Test, Category("SmokeTests")] [TestModel(@".\Samples\DynamoSample_2021.rvt")] public void Revit_Floors_and_Framing() { - string samplePath = SetupUnzip("Revit Floors and Framing.dyn"); - string testPath = Path.GetFullPath(samplePath); - - ViewModel.OpenCommand.Execute(testPath); - - AssertNoDummyNodes(); - - RunCurrentModel(); + OpenAndRunSample("Revit Floors and Framing.dyn"); } [Test, Category("SmokeTests")] [TestModel(@".\Samples\DynamoSample_2021.rvt")] public void Revit_Import_Solid() { - string samplePath = SetupUnzip("Revit Import Solid.dyn"); - string testPath = Path.GetFullPath(samplePath); - - ViewModel.OpenCommand.Execute(testPath); - - AssertNoDummyNodes(); - - RunCurrentModel(); + OpenAndRunSample("Revit Import Solid.dyn"); } [Test, Category("SmokeTests")] [TestModel(@".\Samples\DynamoSample_2021.rvt")] public void Revit_Place_Families_By_Level_Set_Parameters() { - string samplePath = SetupUnzip("Revit Place Families By Level Set Parameters.dyn"); - string testPath = Path.GetFullPath(samplePath); - - ViewModel.OpenCommand.Execute(testPath); - - AssertNoDummyNodes(); - - RunCurrentModel(); + OpenAndRunSample("Revit Place Families By Level Set Parameters.dyn"); } [Test, Category("SmokeTests")] [TestModel(@".\Samples\DynamoSample_2021.rvt")] public void Revit_Structural_Framing() { - string samplePath = SetupUnzip("Revit Structural Framing.dyn"); - string testPath = Path.GetFullPath(samplePath); - - ViewModel.OpenCommand.Execute(testPath); - - AssertNoDummyNodes(); - - RunCurrentModel(); + OpenAndRunSample("Revit Structural Framing.dyn"); } } } From 67149729fc35805daa41d07c0fa46c25f67333d5 Mon Sep 17 00:00:00 2001 From: Fusneica-FlorentinCristian Date: Thu, 23 Apr 2026 16:30:24 +0300 Subject: [PATCH 03/24] REVIT-238057: Update .gitignore to include packages directory --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 93d7e05bb..1482aa5af 100644 --- a/.gitignore +++ b/.gitignore @@ -217,6 +217,8 @@ pip-log.txt #Mr Developer .mr.developer.cfg + +packages/* src/AssemblySharedInfoGenerator/AssemblySharedInfo.cs test/Libraries/RevitIntegrationTests/RevitTestConfiguration.xml test/**/*.txt From cd29ffcdb4bd45f86277ab125f4bb8f36718397c Mon Sep 17 00:00:00 2001 From: Fusneica-FlorentinCristian Date: Thu, 23 Apr 2026 16:33:52 +0300 Subject: [PATCH 04/24] Add logs directory to .gitignore to prevent tracking log files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1482aa5af..bf09a2a10 100644 --- a/.gitignore +++ b/.gitignore @@ -227,3 +227,4 @@ test/SystemInJson # Icon resources /src/DynamoRevitIcons/*.resources +logs/* \ No newline at end of file From a65d3814cfba9043a7e97c095ef57597484e8d35 Mon Sep 17 00:00:00 2001 From: Fusneica-FlorentinCristian Date: Thu, 23 Apr 2026 16:35:45 +0300 Subject: [PATCH 05/24] REVIT-238057: Add explicit using System for InvalidOperationException Fixes CS0122 build error where InvalidOperationException was inaccessible without explicit System namespace import. --- test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index 4d9de8748..c8ac84df5 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -1,3 +1,4 @@ +using System; using System.IO; using System.IO.Compression; using System.Linq; From 28ffb6cb67fcc794c78e3d9a85edd59df4d831b3 Mon Sep 17 00:00:00 2001 From: Fusneica-FlorentinCristian Date: Mon, 27 Apr 2026 11:41:08 +0300 Subject: [PATCH 06/24] REVIT-238057: Update OOTB D4R sample tests to use correct models per .dyn annotations --- .../OOTB_D4R_SampleTests.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index c8ac84df5..b19d358a1 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -120,63 +120,63 @@ public void Revit_Geometry_Creation_Points() } [Test, Category("SmokeTests")] - [TestModel(@".\empty.rfa")] + [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] public void Revit_Geometry_Creation_Curves() { OpenAndRunSample("Revit Geometry Creation Curves.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\empty.rfa")] + [TestModel(@".\ConceptualMass.rfa")] public void Revit_Geometry_Creation_Solids() { OpenAndRunSample("Revit Geometry Creation Solids.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\empty.rfa")] + [TestModel(@".\ConceptualMass.rfa")] public void Revit_Geometry_Creation_Surfaces() { OpenAndRunSample("Revit Geometry Creation Surfaces.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\DynamoSample_2021.rvt")] + [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] public void Revit_Adaptive_Component_Placement() { OpenAndRunSample("Revit Adaptive Component Placement.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\DynamoSample_2021.rvt")] + [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] public void Revit_Color() { OpenAndRunSample("Revit Color.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\DynamoSample_2021.rvt")] + [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] public void Revit_Floors_and_Framing() { OpenAndRunSample("Revit Floors and Framing.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\DynamoSample_2021.rvt")] + [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] public void Revit_Import_Solid() { OpenAndRunSample("Revit Import Solid.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\DynamoSample_2021.rvt")] + [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] public void Revit_Place_Families_By_Level_Set_Parameters() { OpenAndRunSample("Revit Place Families By Level Set Parameters.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\DynamoSample_2021.rvt")] + [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] public void Revit_Structural_Framing() { OpenAndRunSample("Revit Structural Framing.dyn"); From 09dbecb6cf589da3782a61e10f65c28d0d392e4f Mon Sep 17 00:00:00 2001 From: Fusneica-FlorentinCristian Date: Wed, 6 May 2026 13:55:32 +0300 Subject: [PATCH 07/24] Address PR feedback: rename class, add node warning check, extract to temp - Rename class to OOTB_D4R_SampleTests (matches filename) - Reorder SetupUnzip priorities: installed samples first - Extract zip to %TEMP%\D4RSamples instead of install dir - Use overwriteFiles:true for re-extraction robustness - Add post-run assertion: fail if any node is in Error/Warning state --- .../OOTB_D4R_SampleTests.cs | 45 ++++++++++++------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index b19d358a1..58de4de30 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -3,6 +3,7 @@ using System.IO.Compression; using System.Linq; using System.Reflection; +using Dynamo.Graph.Nodes; using NUnit.Framework; using RevitTestServices; using RTF.Framework; @@ -15,12 +16,12 @@ namespace RevitSystemTests /// /// The .dyn files are resolved at runtime via which checks, /// in order: - /// 1. An already-extracted D4RSamples folder next to the installed samples directory. - /// 2. A revit-d4r-content-samples-*-net10.zip in the installed samples directory. - /// 3. The already-deployed samples at DynamoForRevit\samples\en-US\Revit\. + /// 1. The already-deployed samples at DynamoForRevit\samples\en-US\Revit\. + /// 2. A previously-extracted cache in the user's temp directory. + /// 3. A revit-d4r-content-samples-*-net10.zip in the samples directory (extracts to temp). /// [TestFixture] - class OOTB_D4R_Tests : RevitSystemTestBase + class OOTB_D4R_SampleTests : RevitSystemTestBase { private static string SetupUnzip(string scriptFileName) { @@ -32,10 +33,18 @@ private static string SetupUnzip(string scriptFileName) string parentDir = Path.GetDirectoryName(assemblyDir); string samplesFolder = Path.Combine(parentDir, "samples"); - string extractedSamplesPath = Path.Combine(samplesFolder, "D4RSamples"); + string extractedSamplesPath = Path.Combine(Path.GetTempPath(), "D4RSamples"); string installedSamplesPath = Path.Combine(samplesFolder, @"en-US\Revit"); - // Priority 1: zip was already extracted from a previous test run + // Priority 1: already-deployed samples (standard Revit install) + if (Directory.Exists(installedSamplesPath)) + { + var resolved = Path.Combine(installedSamplesPath, scriptFileName); + if (File.Exists(resolved)) + return resolved; + } + + // Priority 2: zip was already extracted from a previous test run if (Directory.Exists(extractedSamplesPath)) { var resolved = Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); @@ -43,7 +52,7 @@ private static string SetupUnzip(string scriptFileName) return resolved; } - // Priority 2: zip file is present — extract on first use + // Priority 3: zip file is present — extract on first use if (Directory.Exists(samplesFolder)) { var zipFiles = Directory.GetFiles( @@ -63,21 +72,13 @@ private static string SetupUnzip(string scriptFileName) if (zipFiles.Length == 1) { - ZipFile.ExtractToDirectory(zipFiles[0], extractedSamplesPath); + ZipFile.ExtractToDirectory(zipFiles[0], extractedSamplesPath, overwriteFiles: true); var resolved = Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); if (File.Exists(resolved)) return resolved; } } - // Priority 3: already-deployed samples (standard Revit install) - if (Directory.Exists(installedSamplesPath)) - { - var resolved = Path.Combine(installedSamplesPath, scriptFileName); - if (File.Exists(resolved)) - return resolved; - } - // Provide a useful diagnostic message to help locate the issue if (Directory.Exists(samplesFolder)) { @@ -110,6 +111,18 @@ private void OpenAndRunSample(string scriptFileName) AssertNoDummyNodes(); RunCurrentModel(); + + var errorNodes = ViewModel.Model.CurrentWorkspace.Nodes.Where( + n => n.State == ElementState.Error || n.State == ElementState.Warning).ToList(); + + if (errorNodes.Any()) + { + var details = string.Join("\n", + errorNodes.Select(n => $" [{n.State}] {n.Name} ({n.GUID})")); + Assert.Fail( + $"After RunCurrentModel(), {errorNodes.Count} node(s) are in error/warning state " + + $"in '{scriptFileName}':\n{details}"); + } } [Test, Category("SmokeTests")] From 7d09993b07fca14856457af6b8b14c3bb94a8ee7 Mon Sep 17 00:00:00 2001 From: Fusneica-FlorentinCristian Date: Wed, 6 May 2026 14:13:21 +0300 Subject: [PATCH 08/24] Fix test model paths to use models available in repo - Replace Snowdon Towers (not in repo) with SampleModel.rvt, empty.rfa, AdaptiveComponents.rfa, StructuralFraming.rvt as appropriate - Replace ConceptualMass.rfa (not in repo) with MassWithBoxAndCone.rfa - All referenced models now exist under test/System/ --- .../OOTB_D4R_SampleTests.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index 58de4de30..17a6312a9 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -133,63 +133,63 @@ public void Revit_Geometry_Creation_Points() } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] + [TestModel(@".\empty.rfa")] public void Revit_Geometry_Creation_Curves() { OpenAndRunSample("Revit Geometry Creation Curves.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\ConceptualMass.rfa")] + [TestModel(@".\MassWithBoxAndCone.rfa")] public void Revit_Geometry_Creation_Solids() { OpenAndRunSample("Revit Geometry Creation Solids.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\ConceptualMass.rfa")] + [TestModel(@".\MassWithBoxAndCone.rfa")] public void Revit_Geometry_Creation_Surfaces() { OpenAndRunSample("Revit Geometry Creation Surfaces.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] + [TestModel(@".\AdaptiveComponents.rfa")] public void Revit_Adaptive_Component_Placement() { OpenAndRunSample("Revit Adaptive Component Placement.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] + [TestModel(@".\SampleModel.rvt")] public void Revit_Color() { OpenAndRunSample("Revit Color.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] + [TestModel(@".\SampleModel.rvt")] public void Revit_Floors_and_Framing() { OpenAndRunSample("Revit Floors and Framing.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] + [TestModel(@".\SampleModel.rvt")] public void Revit_Import_Solid() { OpenAndRunSample("Revit Import Solid.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] + [TestModel(@".\SampleModel.rvt")] public void Revit_Place_Families_By_Level_Set_Parameters() { OpenAndRunSample("Revit Place Families By Level Set Parameters.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] + [TestModel(@".\StructuralFraming\StructuralFraming.rvt")] public void Revit_Structural_Framing() { OpenAndRunSample("Revit Structural Framing.dyn"); From cccade8fb1c4186ad9f30ece40585a8d0a74b2a9 Mon Sep 17 00:00:00 2001 From: Fusneica-FlorentinCristian Date: Wed, 6 May 2026 14:30:17 +0300 Subject: [PATCH 09/24] Use version-keyed temp cache with atomic extraction - Derive cache folder from zip filename (invalidates on version change) - Extract to staging dir, move atomically into place - Clean up staging on failure for self-healing retry - Simplify to 2 priorities: installed samples, then zip cache --- .../OOTB_D4R_SampleTests.cs | 42 +++++++++++++------ 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index 17a6312a9..4f7369ad8 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -17,8 +17,8 @@ namespace RevitSystemTests /// The .dyn files are resolved at runtime via which checks, /// in order: /// 1. The already-deployed samples at DynamoForRevit\samples\en-US\Revit\. - /// 2. A previously-extracted cache in the user's temp directory. - /// 3. A revit-d4r-content-samples-*-net10.zip in the samples directory (extracts to temp). + /// 2. A revit-d4r-content-samples-*-net10.zip in the samples directory + /// (extracted to a version-keyed cache in %TEMP%\D4RSamples\). /// [TestFixture] class OOTB_D4R_SampleTests : RevitSystemTestBase @@ -33,7 +33,6 @@ private static string SetupUnzip(string scriptFileName) string parentDir = Path.GetDirectoryName(assemblyDir); string samplesFolder = Path.Combine(parentDir, "samples"); - string extractedSamplesPath = Path.Combine(Path.GetTempPath(), "D4RSamples"); string installedSamplesPath = Path.Combine(samplesFolder, @"en-US\Revit"); // Priority 1: already-deployed samples (standard Revit install) @@ -44,15 +43,7 @@ private static string SetupUnzip(string scriptFileName) return resolved; } - // Priority 2: zip was already extracted from a previous test run - if (Directory.Exists(extractedSamplesPath)) - { - var resolved = Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); - if (File.Exists(resolved)) - return resolved; - } - - // Priority 3: zip file is present — extract on first use + // Priority 2: zip file — use version-keyed cache in temp to avoid staleness if (Directory.Exists(samplesFolder)) { var zipFiles = Directory.GetFiles( @@ -72,10 +63,35 @@ private static string SetupUnzip(string scriptFileName) if (zipFiles.Length == 1) { - ZipFile.ExtractToDirectory(zipFiles[0], extractedSamplesPath, overwriteFiles: true); + // Derive cache folder name from zip filename to invalidate on version change + string zipName = Path.GetFileNameWithoutExtension(zipFiles[0]); + string extractedSamplesPath = Path.Combine(Path.GetTempPath(), "D4RSamples", zipName); + + // If already extracted for this version, use cached var resolved = Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); if (File.Exists(resolved)) return resolved; + + // Extract to staging dir, then move into place to avoid partial cache + string stagingPath = extractedSamplesPath + "_staging_" + Guid.NewGuid().ToString("N")[..8]; + try + { + ZipFile.ExtractToDirectory(zipFiles[0], stagingPath); + if (Directory.Exists(extractedSamplesPath)) + Directory.Delete(extractedSamplesPath, recursive: true); + Directory.Move(stagingPath, extractedSamplesPath); + } + catch + { + // Clean up staging on failure so next run can retry + if (Directory.Exists(stagingPath)) + Directory.Delete(stagingPath, recursive: true); + throw; + } + + resolved = Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); + if (File.Exists(resolved)) + return resolved; } } From 1718dcf0d6c6a047088644679181e2381ee05e10 Mon Sep 17 00:00:00 2001 From: Fusneica-FlorentinCristian Date: Wed, 6 May 2026 14:37:05 +0300 Subject: [PATCH 10/24] Add cache fallback when zip is absent Scan existing %TEMP%\D4RSamples\ subdirectories (most recent first) as priority 3, so a previously extracted cache remains usable even after the source zip is removed. --- .../RevitIntegrationTests/OOTB_D4R_SampleTests.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index 4f7369ad8..95ad140c2 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -19,6 +19,7 @@ namespace RevitSystemTests /// 1. The already-deployed samples at DynamoForRevit\samples\en-US\Revit\. /// 2. A revit-d4r-content-samples-*-net10.zip in the samples directory /// (extracted to a version-keyed cache in %TEMP%\D4RSamples\). + /// 3. Any previously cached extraction under %TEMP%\D4RSamples\ (most recent first). /// [TestFixture] class OOTB_D4R_SampleTests : RevitSystemTestBase @@ -95,6 +96,18 @@ private static string SetupUnzip(string scriptFileName) } } + // Priority 3: reuse any previously cached extraction (zip may have been removed) + string cacheRoot = Path.Combine(Path.GetTempPath(), "D4RSamples"); + if (Directory.Exists(cacheRoot)) + { + var cached = Directory.GetDirectories(cacheRoot) + .OrderByDescending(d => Directory.GetLastWriteTime(d)) + .Select(d => Path.Combine(d, @"Samples\en-US\Revit", scriptFileName)) + .FirstOrDefault(File.Exists); + if (cached != null) + return cached; + } + // Provide a useful diagnostic message to help locate the issue if (Directory.Exists(samplesFolder)) { From 8ed8cacecd2cc5b2a00b84ac5bd6245d3d57d62d Mon Sep 17 00:00:00 2001 From: Fusneica-FlorentinCristian Date: Wed, 6 May 2026 14:48:52 +0300 Subject: [PATCH 11/24] Comment out zip extraction priorities, keep for future use Only the installed samples path is active (priority 1). Zip-based extraction (priorities 2/3) is preserved as commented code in a #region block for potential future enablement. --- .../OOTB_D4R_SampleTests.cs | 141 +++++++++--------- 1 file changed, 71 insertions(+), 70 deletions(-) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index 95ad140c2..601f57c31 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -1,6 +1,6 @@ using System; using System.IO; -using System.IO.Compression; +// using System.IO.Compression; // Needed when zip extraction (priorities 2/3) is enabled using System.Linq; using System.Reflection; using Dynamo.Graph.Nodes; @@ -14,12 +14,11 @@ namespace RevitSystemTests /// Tests for the Out-of-the-Box (OOTB) D4R sample scripts shipped as part of the /// revit-d4r-content-samples artifact. /// - /// The .dyn files are resolved at runtime via which checks, - /// in order: - /// 1. The already-deployed samples at DynamoForRevit\samples\en-US\Revit\. - /// 2. A revit-d4r-content-samples-*-net10.zip in the samples directory - /// (extracted to a version-keyed cache in %TEMP%\D4RSamples\). - /// 3. Any previously cached extraction under %TEMP%\D4RSamples\ (most recent first). + /// The .dyn files are resolved at runtime via which checks + /// the already-deployed samples at DynamoForRevit\samples\en-US\Revit\. + /// + /// Future consideration: zip-based extraction is available as commented code below + /// (priorities 2 and 3) for scenarios where the samples are shipped as a zip artifact. /// [TestFixture] class OOTB_D4R_SampleTests : RevitSystemTestBase @@ -44,69 +43,71 @@ private static string SetupUnzip(string scriptFileName) return resolved; } - // Priority 2: zip file — use version-keyed cache in temp to avoid staleness - if (Directory.Exists(samplesFolder)) - { - var zipFiles = Directory.GetFiles( - samplesFolder, - "revit-d4r-content-samples-*-net10.zip") - .OrderBy(path => path) - .ToArray(); - - if (zipFiles.Length > 1) - { - var matches = zipFiles.Select(path => $"\n {path}"); - throw new InvalidOperationException( - $"Multiple revit-d4r-content-samples archives were found in '{samplesFolder}', " + - $"so the OOTB D4R sample source is ambiguous. Ensure exactly one matching zip is present." + - $"{string.Concat(matches)}"); - } - - if (zipFiles.Length == 1) - { - // Derive cache folder name from zip filename to invalidate on version change - string zipName = Path.GetFileNameWithoutExtension(zipFiles[0]); - string extractedSamplesPath = Path.Combine(Path.GetTempPath(), "D4RSamples", zipName); - - // If already extracted for this version, use cached - var resolved = Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); - if (File.Exists(resolved)) - return resolved; - - // Extract to staging dir, then move into place to avoid partial cache - string stagingPath = extractedSamplesPath + "_staging_" + Guid.NewGuid().ToString("N")[..8]; - try - { - ZipFile.ExtractToDirectory(zipFiles[0], stagingPath); - if (Directory.Exists(extractedSamplesPath)) - Directory.Delete(extractedSamplesPath, recursive: true); - Directory.Move(stagingPath, extractedSamplesPath); - } - catch - { - // Clean up staging on failure so next run can retry - if (Directory.Exists(stagingPath)) - Directory.Delete(stagingPath, recursive: true); - throw; - } - - resolved = Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); - if (File.Exists(resolved)) - return resolved; - } - } - - // Priority 3: reuse any previously cached extraction (zip may have been removed) - string cacheRoot = Path.Combine(Path.GetTempPath(), "D4RSamples"); - if (Directory.Exists(cacheRoot)) - { - var cached = Directory.GetDirectories(cacheRoot) - .OrderByDescending(d => Directory.GetLastWriteTime(d)) - .Select(d => Path.Combine(d, @"Samples\en-US\Revit", scriptFileName)) - .FirstOrDefault(File.Exists); - if (cached != null) - return cached; - } + #region Future: zip-based extraction (priorities 2 and 3) + // // Priority 2: zip file — use version-keyed cache in temp to avoid staleness + // if (Directory.Exists(samplesFolder)) + // { + // var zipFiles = Directory.GetFiles( + // samplesFolder, + // "revit-d4r-content-samples-*-net10.zip") + // .OrderBy(path => path) + // .ToArray(); + // + // if (zipFiles.Length > 1) + // { + // var matches = zipFiles.Select(path => $"\n {path}"); + // throw new InvalidOperationException( + // $"Multiple revit-d4r-content-samples archives were found in '{samplesFolder}', " + + // $"so the OOTB D4R sample source is ambiguous. Ensure exactly one matching zip is present." + + // $"{string.Concat(matches)}"); + // } + // + // if (zipFiles.Length == 1) + // { + // // Derive cache folder name from zip filename to invalidate on version change + // string zipName = Path.GetFileNameWithoutExtension(zipFiles[0]); + // string extractedSamplesPath = Path.Combine(Path.GetTempPath(), "D4RSamples", zipName); + // + // // If already extracted for this version, use cached + // var resolved = Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); + // if (File.Exists(resolved)) + // return resolved; + // + // // Extract to staging dir, then move into place to avoid partial cache + // string stagingPath = extractedSamplesPath + "_staging_" + Guid.NewGuid().ToString("N")[..8]; + // try + // { + // ZipFile.ExtractToDirectory(zipFiles[0], stagingPath); + // if (Directory.Exists(extractedSamplesPath)) + // Directory.Delete(extractedSamplesPath, recursive: true); + // Directory.Move(stagingPath, extractedSamplesPath); + // } + // catch + // { + // // Clean up staging on failure so next run can retry + // if (Directory.Exists(stagingPath)) + // Directory.Delete(stagingPath, recursive: true); + // throw; + // } + // + // resolved = Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); + // if (File.Exists(resolved)) + // return resolved; + // } + // } + // + // // Priority 3: reuse any previously cached extraction (zip may have been removed) + // string cacheRoot = Path.Combine(Path.GetTempPath(), "D4RSamples"); + // if (Directory.Exists(cacheRoot)) + // { + // var cached = Directory.GetDirectories(cacheRoot) + // .OrderByDescending(d => Directory.GetLastWriteTime(d)) + // .Select(d => Path.Combine(d, @"Samples\en-US\Revit", scriptFileName)) + // .FirstOrDefault(File.Exists); + // if (cached != null) + // return cached; + // } + #endregion // Provide a useful diagnostic message to help locate the issue if (Directory.Exists(samplesFolder)) From 719f06eca80ec3df80135383576572b6beeb6523 Mon Sep 17 00:00:00 2001 From: Fusneica-FlorentinCristian Date: Wed, 6 May 2026 14:56:33 +0300 Subject: [PATCH 12/24] Rename SetupUnzip to ResolveSamplePath, add locale probe, sort diagnostics - Rename method since zip code is commented out (clearer intent) - Probe CurrentUICulture locale first, then fall back to en-US - Sort directory listing in diagnostic exceptions for determinism --- .../OOTB_D4R_SampleTests.cs | 37 +++++++++++++------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index 601f57c31..9ced55ec3 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -14,8 +14,8 @@ namespace RevitSystemTests /// Tests for the Out-of-the-Box (OOTB) D4R sample scripts shipped as part of the /// revit-d4r-content-samples artifact. /// - /// The .dyn files are resolved at runtime via which checks - /// the already-deployed samples at DynamoForRevit\samples\en-US\Revit\. + /// The .dyn files are resolved at runtime via which checks + /// the already-deployed samples at DynamoForRevit\samples\{locale}\Revit\. /// /// Future consideration: zip-based extraction is available as commented code below /// (priorities 2 and 3) for scenarios where the samples are shipped as a zip artifact. @@ -23,7 +23,7 @@ namespace RevitSystemTests [TestFixture] class OOTB_D4R_SampleTests : RevitSystemTestBase { - private static string SetupUnzip(string scriptFileName) + private static string ResolveSamplePath(string scriptFileName) { string assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); @@ -33,14 +33,26 @@ private static string SetupUnzip(string scriptFileName) string parentDir = Path.GetDirectoryName(assemblyDir); string samplesFolder = Path.Combine(parentDir, "samples"); - string installedSamplesPath = Path.Combine(samplesFolder, @"en-US\Revit"); - // Priority 1: already-deployed samples (standard Revit install) - if (Directory.Exists(installedSamplesPath)) + // Priority 1: already-deployed samples — probe current culture then en-US fallback + if (Directory.Exists(samplesFolder)) { - var resolved = Path.Combine(installedSamplesPath, scriptFileName); - if (File.Exists(resolved)) - return resolved; + var localesToProbe = new[] + { + System.Globalization.CultureInfo.CurrentUICulture.Name, // e.g. "fr-FR" + "en-US" + }.Distinct(); + + foreach (var locale in localesToProbe) + { + string localePath = Path.Combine(samplesFolder, locale, "Revit"); + if (Directory.Exists(localePath)) + { + var resolved = Path.Combine(localePath, scriptFileName); + if (File.Exists(resolved)) + return resolved; + } + } } #region Future: zip-based extraction (priorities 2 and 3) @@ -113,6 +125,7 @@ private static string SetupUnzip(string scriptFileName) if (Directory.Exists(samplesFolder)) { var entries = Directory.EnumerateFileSystemEntries(samplesFolder) + .OrderBy(e => e) .Select(e => $"\n {e}"); throw new FileNotFoundException( $"Cannot locate OOTB D4R sample script '{scriptFileName}'.\n" + @@ -122,18 +135,18 @@ private static string SetupUnzip(string scriptFileName) else { var parentEntries = Directory.Exists(parentDir) - ? Directory.EnumerateDirectories(parentDir).Select(e => $"\n {e}") + ? Directory.EnumerateDirectories(parentDir).OrderBy(e => e).Select(e => $"\n {e}") : Enumerable.Empty(); throw new FileNotFoundException( $"Cannot locate OOTB D4R sample script '{scriptFileName}'.\n" + $"Expected samples folder not found: {samplesFolder}\n" + - $"Parent dir contents:{string.Concat(parentEntries)}"); + $"Parent dir contents:{string.Concat(parentEntries)}");; } } private void OpenAndRunSample(string scriptFileName) { - string samplePath = SetupUnzip(scriptFileName); + string samplePath = ResolveSamplePath(scriptFileName); string testPath = Path.GetFullPath(samplePath); ViewModel.OpenCommand.Execute(testPath); From bd2666829d1325c6f9b5adb1e83417305978fa44 Mon Sep 17 00:00:00 2001 From: Fusneica-FlorentinCristian Date: Wed, 6 May 2026 15:06:13 +0300 Subject: [PATCH 13/24] Fix double semicolon, add comment clarifying SamplesPath distinction - Remove extra trailing semicolon after throw statement - Add comment explaining why we use assembly-relative path instead of base class SamplesPath (D4R OOTB samples vs doc/distrib/Samples) --- .../Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index 9ced55ec3..d5eb2d887 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -27,6 +27,10 @@ private static string ResolveSamplePath(string scriptFileName) { string assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + // NOTE: We intentionally do NOT use the base class SamplesPath (which points to + // doc/distrib/Samples/ for Dynamo core samples). The D4R OOTB samples are deployed + // at DynamoForRevit\samples\{locale}\Revit\ alongside the plugin. + // // When deployed to Revit: // assemblyDir = DynamoForRevit\Revit\ // parentDir = DynamoForRevit\ @@ -140,7 +144,7 @@ private static string ResolveSamplePath(string scriptFileName) throw new FileNotFoundException( $"Cannot locate OOTB D4R sample script '{scriptFileName}'.\n" + $"Expected samples folder not found: {samplesFolder}\n" + - $"Parent dir contents:{string.Concat(parentEntries)}");; + $"Parent dir contents:{string.Concat(parentEntries)}"); } } From cb5cc3119a708699a9eef8df1352eb795ada5b36 Mon Sep 17 00:00:00 2001 From: Fusneica-FlorentinCristian Date: Wed, 6 May 2026 15:16:44 +0300 Subject: [PATCH 14/24] Add graph-loaded assertion, clarify assembly location pattern - Assert CurrentWorkspace.Nodes.Any() after OpenCommand to catch load failures - Add comment explaining GetExecutingAssembly() is the standard test pattern used throughout RevitSystemTestBase/SystemTest/CoreTests/RegressionTests --- .../RevitIntegrationTests/OOTB_D4R_SampleTests.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index d5eb2d887..c0eb2920a 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -25,13 +25,16 @@ class OOTB_D4R_SampleTests : RevitSystemTestBase { private static string ResolveSamplePath(string scriptFileName) { + // Assembly.GetExecutingAssembly().Location is the standard pattern used throughout + // the test framework (RevitSystemTestBase, SystemTest, CoreTests, RegressionTests). + // RTF always loads test assemblies from the deployed DynamoForRevit\Revit\ folder. string assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); // NOTE: We intentionally do NOT use the base class SamplesPath (which points to // doc/distrib/Samples/ for Dynamo core samples). The D4R OOTB samples are deployed // at DynamoForRevit\samples\{locale}\Revit\ alongside the plugin. // - // When deployed to Revit: + // When deployed to Revit (via RTF): // assemblyDir = DynamoForRevit\Revit\ // parentDir = DynamoForRevit\ string parentDir = Path.GetDirectoryName(assemblyDir); @@ -155,6 +158,10 @@ private void OpenAndRunSample(string scriptFileName) ViewModel.OpenCommand.Execute(testPath); + Assert.IsTrue( + ViewModel.Model.CurrentWorkspace.Nodes.Any(), + $"Graph '{scriptFileName}' opened but contains no nodes — file may not have loaded correctly."); + AssertNoDummyNodes(); RunCurrentModel(); From a1611aaba496c868ac39d663490612982fe458ea Mon Sep 17 00:00:00 2001 From: Fusneica-FlorentinCristian Date: Fri, 8 May 2026 14:51:15 +0300 Subject: [PATCH 15/24] Improve assertion diagnostics: show node messages and connector details - Use NodeInfos to surface actual error/warning messages per node - Include node type name for easier identification - Report connector GUID and Start/End port details for broken connectors --- .../OOTB_D4R_SampleTests.cs | 40 +++++++++++++++++-- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index c0eb2920a..e37c3b018 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -30,8 +30,8 @@ private static string ResolveSamplePath(string scriptFileName) // RTF always loads test assemblies from the deployed DynamoForRevit\Revit\ folder. string assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - // NOTE: We intentionally do NOT use the base class SamplesPath (which points to - // doc/distrib/Samples/ for Dynamo core samples). The D4R OOTB samples are deployed + // NOTE: We intentionally do NOT use the test configuration's core samples location + // (doc/distrib/Samples/ for Dynamo core samples). The D4R OOTB samples are deployed // at DynamoForRevit\samples\{locale}\Revit\ alongside the plugin. // // When deployed to Revit (via RTF): @@ -164,6 +164,29 @@ private void OpenAndRunSample(string scriptFileName) AssertNoDummyNodes(); + // Verify no broken connectors — a missing start/end port indicates a load problem + // (e.g. renamed or removed node ports between versions). + var brokenConnectors = ViewModel.Model.CurrentWorkspace.Connectors + .Where(c => c.Start == null || c.End == null).ToList(); + + if (brokenConnectors.Any()) + { + var details = string.Join("\n", brokenConnectors.Select(c => + { + string startInfo = c.Start != null + ? $"{c.Start.Owner?.Name}:{c.Start.Name}[{c.Start.Index}]" + : ""; + string endInfo = c.End != null + ? $"{c.End.Owner?.Name}:{c.End.Name}[{c.End.Index}]" + : ""; + return $" Connector {c.GUID}: Start={startInfo} → End={endInfo}"; + })); + + Assert.Fail( + $"Graph '{scriptFileName}' has {brokenConnectors.Count} broken connector(s) " + + $"with missing start or end port:\n{details}"); + } + RunCurrentModel(); var errorNodes = ViewModel.Model.CurrentWorkspace.Nodes.Where( @@ -171,8 +194,17 @@ private void OpenAndRunSample(string scriptFileName) if (errorNodes.Any()) { - var details = string.Join("\n", - errorNodes.Select(n => $" [{n.State}] {n.Name} ({n.GUID})")); + var details = string.Join("\n", errorNodes.Select(n => + { + var messages = n.NodeInfos + .Where(i => i.State == ElementState.Error || i.State == ElementState.Warning) + .Select(i => $" [{i.State}] {i.Message}"); + string msgBlock = messages.Any() + ? "\n" + string.Join("\n", messages) + : " (no message details)"; + return $" [{n.State}] {n.Name} ({n.GetType().Name}, GUID: {n.GUID}){msgBlock}"; + })); + Assert.Fail( $"After RunCurrentModel(), {errorNodes.Count} node(s) are in error/warning state " + $"in '{scriptFileName}':\n{details}"); From 090ca0f97819ad2806069f25bce6c5c8e3c83a8e Mon Sep 17 00:00:00 2001 From: 509456_adsk Date: Wed, 22 Jul 2026 13:24:49 +0300 Subject: [PATCH 16/24] REVIT-238057: Trim OOTB smoke test fixture (ponytail review) Co-authored-by: Cursor --- .gitignore | 1 - .../OOTB_D4R_SampleTests.cs | 175 +++--------------- 2 files changed, 22 insertions(+), 154 deletions(-) diff --git a/.gitignore b/.gitignore index bf09a2a10..f9f1aa24a 100644 --- a/.gitignore +++ b/.gitignore @@ -218,7 +218,6 @@ pip-log.txt #Mr Developer .mr.developer.cfg -packages/* src/AssemblySharedInfoGenerator/AssemblySharedInfo.cs test/Libraries/RevitIntegrationTests/RevitTestConfiguration.xml test/**/*.txt diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index e37c3b018..0c12fcca3 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -1,6 +1,5 @@ using System; using System.IO; -// using System.IO.Compression; // Needed when zip extraction (priorities 2/3) is enabled using System.Linq; using System.Reflection; using Dynamo.Graph.Nodes; @@ -11,46 +10,22 @@ namespace RevitSystemTests { /// - /// Tests for the Out-of-the-Box (OOTB) D4R sample scripts shipped as part of the - /// revit-d4r-content-samples artifact. - /// - /// The .dyn files are resolved at runtime via which checks - /// the already-deployed samples at DynamoForRevit\samples\{locale}\Revit\. - /// - /// Future consideration: zip-based extraction is available as commented code below - /// (priorities 2 and 3) for scenarios where the samples are shipped as a zip artifact. + /// Smoke tests for OOTB D4R sample scripts. Resolves .dyn files from + /// DynamoForRevit\samples\{locale}\Revit\ via . /// [TestFixture] class OOTB_D4R_SampleTests : RevitSystemTestBase { private static string ResolveSamplePath(string scriptFileName) { - // Assembly.GetExecutingAssembly().Location is the standard pattern used throughout - // the test framework (RevitSystemTestBase, SystemTest, CoreTests, RegressionTests). - // RTF always loads test assemblies from the deployed DynamoForRevit\Revit\ folder. string assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - - // NOTE: We intentionally do NOT use the test configuration's core samples location - // (doc/distrib/Samples/ for Dynamo core samples). The D4R OOTB samples are deployed - // at DynamoForRevit\samples\{locale}\Revit\ alongside the plugin. - // - // When deployed to Revit (via RTF): - // assemblyDir = DynamoForRevit\Revit\ - // parentDir = DynamoForRevit\ + // Deployed layout: {parentDir}\samples\{locale}\Revit\ (not doc/distrib/Samples) string parentDir = Path.GetDirectoryName(assemblyDir); - string samplesFolder = Path.Combine(parentDir, "samples"); - // Priority 1: already-deployed samples — probe current culture then en-US fallback if (Directory.Exists(samplesFolder)) { - var localesToProbe = new[] - { - System.Globalization.CultureInfo.CurrentUICulture.Name, // e.g. "fr-FR" - "en-US" - }.Distinct(); - - foreach (var locale in localesToProbe) + foreach (var locale in new[] { System.Globalization.CultureInfo.CurrentUICulture.Name, "en-US" }.Distinct()) { string localePath = Path.Combine(samplesFolder, locale, "Revit"); if (Directory.Exists(localePath)) @@ -62,99 +37,20 @@ private static string ResolveSamplePath(string scriptFileName) } } - #region Future: zip-based extraction (priorities 2 and 3) - // // Priority 2: zip file — use version-keyed cache in temp to avoid staleness - // if (Directory.Exists(samplesFolder)) - // { - // var zipFiles = Directory.GetFiles( - // samplesFolder, - // "revit-d4r-content-samples-*-net10.zip") - // .OrderBy(path => path) - // .ToArray(); - // - // if (zipFiles.Length > 1) - // { - // var matches = zipFiles.Select(path => $"\n {path}"); - // throw new InvalidOperationException( - // $"Multiple revit-d4r-content-samples archives were found in '{samplesFolder}', " + - // $"so the OOTB D4R sample source is ambiguous. Ensure exactly one matching zip is present." + - // $"{string.Concat(matches)}"); - // } - // - // if (zipFiles.Length == 1) - // { - // // Derive cache folder name from zip filename to invalidate on version change - // string zipName = Path.GetFileNameWithoutExtension(zipFiles[0]); - // string extractedSamplesPath = Path.Combine(Path.GetTempPath(), "D4RSamples", zipName); - // - // // If already extracted for this version, use cached - // var resolved = Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); - // if (File.Exists(resolved)) - // return resolved; - // - // // Extract to staging dir, then move into place to avoid partial cache - // string stagingPath = extractedSamplesPath + "_staging_" + Guid.NewGuid().ToString("N")[..8]; - // try - // { - // ZipFile.ExtractToDirectory(zipFiles[0], stagingPath); - // if (Directory.Exists(extractedSamplesPath)) - // Directory.Delete(extractedSamplesPath, recursive: true); - // Directory.Move(stagingPath, extractedSamplesPath); - // } - // catch - // { - // // Clean up staging on failure so next run can retry - // if (Directory.Exists(stagingPath)) - // Directory.Delete(stagingPath, recursive: true); - // throw; - // } - // - // resolved = Path.Combine(extractedSamplesPath, @"Samples\en-US\Revit", scriptFileName); - // if (File.Exists(resolved)) - // return resolved; - // } - // } - // - // // Priority 3: reuse any previously cached extraction (zip may have been removed) - // string cacheRoot = Path.Combine(Path.GetTempPath(), "D4RSamples"); - // if (Directory.Exists(cacheRoot)) - // { - // var cached = Directory.GetDirectories(cacheRoot) - // .OrderByDescending(d => Directory.GetLastWriteTime(d)) - // .Select(d => Path.Combine(d, @"Samples\en-US\Revit", scriptFileName)) - // .FirstOrDefault(File.Exists); - // if (cached != null) - // return cached; - // } - #endregion + var hint = Directory.Exists(samplesFolder) + ? $"Contents:{string.Concat(Directory.EnumerateFileSystemEntries(samplesFolder).OrderBy(e => e).Select(e => $"\n {e}"))}" + : Directory.Exists(parentDir) + ? $"Parent dir contents:{string.Concat(Directory.EnumerateDirectories(parentDir).OrderBy(e => e).Select(e => $"\n {e}"))}" + : string.Empty; - // Provide a useful diagnostic message to help locate the issue - if (Directory.Exists(samplesFolder)) - { - var entries = Directory.EnumerateFileSystemEntries(samplesFolder) - .OrderBy(e => e) - .Select(e => $"\n {e}"); - throw new FileNotFoundException( - $"Cannot locate OOTB D4R sample script '{scriptFileName}'.\n" + - $"Checked samples folder: {samplesFolder}\n" + - $"Contents:{string.Concat(entries)}"); - } - else - { - var parentEntries = Directory.Exists(parentDir) - ? Directory.EnumerateDirectories(parentDir).OrderBy(e => e).Select(e => $"\n {e}") - : Enumerable.Empty(); - throw new FileNotFoundException( - $"Cannot locate OOTB D4R sample script '{scriptFileName}'.\n" + - $"Expected samples folder not found: {samplesFolder}\n" + - $"Parent dir contents:{string.Concat(parentEntries)}"); - } + throw new FileNotFoundException( + $"Cannot locate OOTB D4R sample script '{scriptFileName}'.\n" + + $"Samples folder: {samplesFolder}\n{hint}"); } private void OpenAndRunSample(string scriptFileName) { - string samplePath = ResolveSamplePath(scriptFileName); - string testPath = Path.GetFullPath(samplePath); + string testPath = Path.GetFullPath(ResolveSamplePath(scriptFileName)); ViewModel.OpenCommand.Execute(testPath); @@ -164,50 +60,23 @@ private void OpenAndRunSample(string scriptFileName) AssertNoDummyNodes(); - // Verify no broken connectors — a missing start/end port indicates a load problem - // (e.g. renamed or removed node ports between versions). var brokenConnectors = ViewModel.Model.CurrentWorkspace.Connectors .Where(c => c.Start == null || c.End == null).ToList(); - - if (brokenConnectors.Any()) - { - var details = string.Join("\n", brokenConnectors.Select(c => - { - string startInfo = c.Start != null - ? $"{c.Start.Owner?.Name}:{c.Start.Name}[{c.Start.Index}]" - : ""; - string endInfo = c.End != null - ? $"{c.End.Owner?.Name}:{c.End.Name}[{c.End.Index}]" - : ""; - return $" Connector {c.GUID}: Start={startInfo} → End={endInfo}"; - })); - - Assert.Fail( - $"Graph '{scriptFileName}' has {brokenConnectors.Count} broken connector(s) " + - $"with missing start or end port:\n{details}"); - } + Assert.IsFalse(brokenConnectors.Any(), + $"Graph '{scriptFileName}' has {brokenConnectors.Count} broken connector(s)."); RunCurrentModel(); - var errorNodes = ViewModel.Model.CurrentWorkspace.Nodes.Where( - n => n.State == ElementState.Error || n.State == ElementState.Warning).ToList(); - + var errorNodes = ViewModel.Model.CurrentWorkspace.Nodes + .Where(n => n.State == ElementState.Error || n.State == ElementState.Warning).ToList(); if (errorNodes.Any()) { - var details = string.Join("\n", errorNodes.Select(n => - { - var messages = n.NodeInfos - .Where(i => i.State == ElementState.Error || i.State == ElementState.Warning) - .Select(i => $" [{i.State}] {i.Message}"); - string msgBlock = messages.Any() - ? "\n" + string.Join("\n", messages) - : " (no message details)"; - return $" [{n.State}] {n.Name} ({n.GetType().Name}, GUID: {n.GUID}){msgBlock}"; - })); - + var first = errorNodes[0]; + var msg = first.NodeInfos + .FirstOrDefault(i => i.State == ElementState.Error || i.State == ElementState.Warning)?.Message; Assert.Fail( - $"After RunCurrentModel(), {errorNodes.Count} node(s) are in error/warning state " + - $"in '{scriptFileName}':\n{details}"); + $"After RunCurrentModel(), {errorNodes.Count} node(s) in error/warning in '{scriptFileName}'. " + + $"First: [{first.State}] {first.Name}" + (msg != null ? $": {msg}" : string.Empty)); } } From 076242c5d5efdf602745820fa907c0b30b2ee6c0 Mon Sep 17 00:00:00 2001 From: 509456_adsk Date: Wed, 22 Jul 2026 23:20:42 +0300 Subject: [PATCH 17/24] REVIT-238057: Align StructuralFraming TestModel with journal path --- test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index 0c12fcca3..6065a8b5c 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -144,7 +144,7 @@ public void Revit_Place_Families_By_Level_Set_Parameters() } [Test, Category("SmokeTests")] - [TestModel(@".\StructuralFraming\StructuralFraming.rvt")] + [TestModel(@".\StructuralFraming.rvt")] public void Revit_Structural_Framing() { OpenAndRunSample("Revit Structural Framing.dyn"); From 74eed480e684bb738d9e21fccbb4b962731c8fb6 Mon Sep 17 00:00:00 2001 From: 509456_adsk Date: Fri, 24 Jul 2026 20:24:33 +0300 Subject: [PATCH 18/24] REVIT-238057: Harden OOTB smoke tests for graph execution Use empty.rfa for Surfaces and assert no error/warning nodes after RunCurrentModel. --- test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index 6065a8b5c..7417a1c06 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -102,7 +102,7 @@ public void Revit_Geometry_Creation_Solids() } [Test, Category("SmokeTests")] - [TestModel(@".\MassWithBoxAndCone.rfa")] + [TestModel(@".\empty.rfa")] public void Revit_Geometry_Creation_Surfaces() { OpenAndRunSample("Revit Geometry Creation Surfaces.dyn"); From b7c63147956a818032db16a66bf155cb91e0deab Mon Sep 17 00:00:00 2001 From: 509456_adsk Date: Mon, 27 Jul 2026 12:24:00 +0300 Subject: [PATCH 19/24] REVIT-238057: Use empty.rfa for OOTB Solids smoke test Align with farm-available QATestData model; matches legacy Sample/Geometry_Solids regression. --- test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index 7417a1c06..63e9602c4 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -95,7 +95,7 @@ public void Revit_Geometry_Creation_Curves() } [Test, Category("SmokeTests")] - [TestModel(@".\MassWithBoxAndCone.rfa")] + [TestModel(@".\empty.rfa")] public void Revit_Geometry_Creation_Solids() { OpenAndRunSample("Revit Geometry Creation Solids.dyn"); From 145fcc400ba67317c4c2fbbd69820f8c009d74b9 Mon Sep 17 00:00:00 2001 From: 509456_adsk Date: Mon, 27 Jul 2026 22:13:56 +0300 Subject: [PATCH 20/24] Use DynamoSample_2020.rvt for OOTB sample-model smoke tests. Align TestModel paths with legacy Sample regression model used by CrsTest journals after Newport failures on SampleModel_2023.rvt. --- .../RevitIntegrationTests/OOTB_D4R_SampleTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index 63e9602c4..5cf5582b1 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -116,28 +116,28 @@ public void Revit_Adaptive_Component_Placement() } [Test, Category("SmokeTests")] - [TestModel(@".\SampleModel.rvt")] + [TestModel(@".\DynamoSample_2020.rvt")] public void Revit_Color() { OpenAndRunSample("Revit Color.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\SampleModel.rvt")] + [TestModel(@".\DynamoSample_2020.rvt")] public void Revit_Floors_and_Framing() { OpenAndRunSample("Revit Floors and Framing.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\SampleModel.rvt")] + [TestModel(@".\DynamoSample_2020.rvt")] public void Revit_Import_Solid() { OpenAndRunSample("Revit Import Solid.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\SampleModel.rvt")] + [TestModel(@".\DynamoSample_2020.rvt")] public void Revit_Place_Families_By_Level_Set_Parameters() { OpenAndRunSample("Revit Place Families By Level Set Parameters.dyn"); From c3036d92756d5a3257af0e00d5aca77941dc7f29 Mon Sep 17 00:00:00 2001 From: 509456_adsk Date: Tue, 28 Jul 2026 10:39:59 +0300 Subject: [PATCH 21/24] OOTB smoke: fail on Error only and rename colliding test names. Avoid RTF testName collisions with legacy SampleTests and align smoke checks with legacy behavior by ignoring Warning-state nodes after RunCurrentModel. --- .../RevitIntegrationTests/OOTB_D4R_SampleTests.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index 5cf5582b1..2124d35a9 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -68,14 +68,14 @@ private void OpenAndRunSample(string scriptFileName) RunCurrentModel(); var errorNodes = ViewModel.Model.CurrentWorkspace.Nodes - .Where(n => n.State == ElementState.Error || n.State == ElementState.Warning).ToList(); + .Where(n => n.State == ElementState.Error).ToList(); if (errorNodes.Any()) { var first = errorNodes[0]; var msg = first.NodeInfos - .FirstOrDefault(i => i.State == ElementState.Error || i.State == ElementState.Warning)?.Message; + .FirstOrDefault(i => i.State == ElementState.Error)?.Message; Assert.Fail( - $"After RunCurrentModel(), {errorNodes.Count} node(s) in error/warning in '{scriptFileName}'. " + + $"After RunCurrentModel(), {errorNodes.Count} node(s) in error in '{scriptFileName}'. " + $"First: [{first.State}] {first.Name}" + (msg != null ? $": {msg}" : string.Empty)); } } @@ -110,21 +110,21 @@ public void Revit_Geometry_Creation_Surfaces() [Test, Category("SmokeTests")] [TestModel(@".\AdaptiveComponents.rfa")] - public void Revit_Adaptive_Component_Placement() + public void OOTB_Revit_Adaptive_Component_Placement() { OpenAndRunSample("Revit Adaptive Component Placement.dyn"); } [Test, Category("SmokeTests")] [TestModel(@".\DynamoSample_2020.rvt")] - public void Revit_Color() + public void OOTB_Revit_Color() { OpenAndRunSample("Revit Color.dyn"); } [Test, Category("SmokeTests")] [TestModel(@".\DynamoSample_2020.rvt")] - public void Revit_Floors_and_Framing() + public void OOTB_Revit_Floors_and_Framing() { OpenAndRunSample("Revit Floors and Framing.dyn"); } From bd1d8b2f522722ad45c87f51d67faa473e381ea2 Mon Sep 17 00:00:00 2001 From: 509456_adsk Date: Tue, 28 Jul 2026 15:31:51 +0300 Subject: [PATCH 22/24] OOTB smoke: trim ResolveSamplePath and drop unrelated gitignore noise. Co-authored-by: Cursor --- .gitignore | 4 +-- .../OOTB_D4R_SampleTests.cs | 36 +++---------------- 2 files changed, 6 insertions(+), 34 deletions(-) diff --git a/.gitignore b/.gitignore index f9f1aa24a..875e04fe6 100644 --- a/.gitignore +++ b/.gitignore @@ -217,7 +217,6 @@ pip-log.txt #Mr Developer .mr.developer.cfg - src/AssemblySharedInfoGenerator/AssemblySharedInfo.cs test/Libraries/RevitIntegrationTests/RevitTestConfiguration.xml test/**/*.txt @@ -225,5 +224,4 @@ test/**/*.addin test/SystemInJson # Icon resources -/src/DynamoRevitIcons/*.resources -logs/* \ No newline at end of file +/src/DynamoRevitIcons/*.resources \ No newline at end of file diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index 2124d35a9..24a95ebc1 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -9,43 +9,19 @@ namespace RevitSystemTests { - /// - /// Smoke tests for OOTB D4R sample scripts. Resolves .dyn files from - /// DynamoForRevit\samples\{locale}\Revit\ via . - /// [TestFixture] class OOTB_D4R_SampleTests : RevitSystemTestBase { private static string ResolveSamplePath(string scriptFileName) { string assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - // Deployed layout: {parentDir}\samples\{locale}\Revit\ (not doc/distrib/Samples) string parentDir = Path.GetDirectoryName(assemblyDir); - string samplesFolder = Path.Combine(parentDir, "samples"); - - if (Directory.Exists(samplesFolder)) - { - foreach (var locale in new[] { System.Globalization.CultureInfo.CurrentUICulture.Name, "en-US" }.Distinct()) - { - string localePath = Path.Combine(samplesFolder, locale, "Revit"); - if (Directory.Exists(localePath)) - { - var resolved = Path.Combine(localePath, scriptFileName); - if (File.Exists(resolved)) - return resolved; - } - } - } - - var hint = Directory.Exists(samplesFolder) - ? $"Contents:{string.Concat(Directory.EnumerateFileSystemEntries(samplesFolder).OrderBy(e => e).Select(e => $"\n {e}"))}" - : Directory.Exists(parentDir) - ? $"Parent dir contents:{string.Concat(Directory.EnumerateDirectories(parentDir).OrderBy(e => e).Select(e => $"\n {e}"))}" - : string.Empty; + string resolved = Path.Combine(parentDir, "samples", "en-US", "Revit", scriptFileName); + if (File.Exists(resolved)) + return resolved; throw new FileNotFoundException( - $"Cannot locate OOTB D4R sample script '{scriptFileName}'.\n" + - $"Samples folder: {samplesFolder}\n{hint}"); + $"Cannot locate OOTB D4R sample script '{scriptFileName}' under {Path.Combine(parentDir, "samples")}."); } private void OpenAndRunSample(string scriptFileName) @@ -72,11 +48,9 @@ private void OpenAndRunSample(string scriptFileName) if (errorNodes.Any()) { var first = errorNodes[0]; - var msg = first.NodeInfos - .FirstOrDefault(i => i.State == ElementState.Error)?.Message; Assert.Fail( $"After RunCurrentModel(), {errorNodes.Count} node(s) in error in '{scriptFileName}'. " + - $"First: [{first.State}] {first.Name}" + (msg != null ? $": {msg}" : string.Empty)); + $"First: [{first.State}] {first.Name}"); } } From 773f288cb43e4812b9a9457c97879cabae87c520 Mon Sep 17 00:00:00 2001 From: 509456_adsk Date: Wed, 29 Jul 2026 17:39:23 +0300 Subject: [PATCH 23/24] OOTB smoke: restore Warning checks and align TestModel with sample Info notes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address Mikhinja D4R #3388 review — fail on Error+Warning (revert dbcc30b3), point Snowdon-dependent tests at Samples/Snowdon Towers Sample Architectural.rvt, Points at AdaptiveComponents.rfa; add Snowdon LFS test asset from Merrimack. Co-authored-by: Cursor --- .gitattributes | 3 +-- .../OOTB_D4R_SampleTests.cs | 24 ++++++++++--------- .../Snowdon Towers Sample Architectural.rvt | 3 +++ 3 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 test/System/Samples/Snowdon Towers Sample Architectural.rvt diff --git a/.gitattributes b/.gitattributes index 412eeda78..4ac7d04ec 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,5 @@ # Auto detect text files and perform LF normalization * text=auto - # Custom for Visual Studio *.cs diff=csharp *.sln merge=union @@ -8,7 +7,6 @@ *.vbproj merge=union *.fsproj merge=union *.dbproj merge=union - # Standard to msysgit *.doc diff=astextplain *.DOC diff=astextplain @@ -20,3 +18,4 @@ *.PDF diff=astextplain *.rtf diff=astextplain *.RTF diff=astextplain +test/System/Samples/Snowdon[[:space:]]Towers[[:space:]]Sample[[:space:]]Architectural.rvt filter=lfs diff=lfs merge=lfs -text diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index 24a95ebc1..124c3d23f 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -44,25 +44,27 @@ private void OpenAndRunSample(string scriptFileName) RunCurrentModel(); var errorNodes = ViewModel.Model.CurrentWorkspace.Nodes - .Where(n => n.State == ElementState.Error).ToList(); + .Where(n => n.State == ElementState.Error || n.State == ElementState.Warning).ToList(); if (errorNodes.Any()) { var first = errorNodes[0]; + var msg = first.NodeInfos + .FirstOrDefault(i => i.State == ElementState.Error || i.State == ElementState.Warning)?.Message; Assert.Fail( - $"After RunCurrentModel(), {errorNodes.Count} node(s) in error in '{scriptFileName}'. " + - $"First: [{first.State}] {first.Name}"); + $"After RunCurrentModel(), {errorNodes.Count} node(s) in error/warning in '{scriptFileName}'. " + + $"First: [{first.State}] {first.Name}" + (msg != null ? $": {msg}" : string.Empty)); } } [Test, Category("SmokeTests")] - [TestModel(@".\empty.rfa")] + [TestModel(@".\AdaptiveComponents.rfa")] public void Revit_Geometry_Creation_Points() { OpenAndRunSample("Revit Geometry Creation Points.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\empty.rfa")] + [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] public void Revit_Geometry_Creation_Curves() { OpenAndRunSample("Revit Geometry Creation Curves.dyn"); @@ -83,42 +85,42 @@ public void Revit_Geometry_Creation_Surfaces() } [Test, Category("SmokeTests")] - [TestModel(@".\AdaptiveComponents.rfa")] + [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] public void OOTB_Revit_Adaptive_Component_Placement() { OpenAndRunSample("Revit Adaptive Component Placement.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\DynamoSample_2020.rvt")] + [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] public void OOTB_Revit_Color() { OpenAndRunSample("Revit Color.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\DynamoSample_2020.rvt")] + [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] public void OOTB_Revit_Floors_and_Framing() { OpenAndRunSample("Revit Floors and Framing.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\DynamoSample_2020.rvt")] + [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] public void Revit_Import_Solid() { OpenAndRunSample("Revit Import Solid.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\DynamoSample_2020.rvt")] + [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] public void Revit_Place_Families_By_Level_Set_Parameters() { OpenAndRunSample("Revit Place Families By Level Set Parameters.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\StructuralFraming.rvt")] + [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] public void Revit_Structural_Framing() { OpenAndRunSample("Revit Structural Framing.dyn"); diff --git a/test/System/Samples/Snowdon Towers Sample Architectural.rvt b/test/System/Samples/Snowdon Towers Sample Architectural.rvt new file mode 100644 index 000000000..f4791d147 --- /dev/null +++ b/test/System/Samples/Snowdon Towers Sample Architectural.rvt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:931eeef58311d87ad5b15eb2622a4a7cd2737091d295c24e625c67e445ad65d1 +size 97615872 From ff6c8c2ceb22883b021acffbcd4a28b48300d5db Mon Sep 17 00:00:00 2001 From: 509456_adsk Date: Fri, 31 Jul 2026 11:54:38 +0300 Subject: [PATCH 24/24] Fix OOTB triage failures: DynamoSample model and Import Solid Level param. Adaptive test uses DynamoSample_2021.rvt to match graph bindings; Snowdon TestModel paths align to journal cwd. Import Solid SetParameterByName uses Level instead of Work Plane (missing on ImportInstance in R28). Co-authored-by: Cursor --- .../Samples/cs-CZ/Revit/Revit Import Solid.dyn | 2 +- .../Samples/de-DE/Revit/Revit Import Solid.dyn | 4 ++-- .../Samples/en-GB/Revit/Revit Import Solid.dyn | 4 ++-- .../Samples/en-US/Revit/Revit Import Solid.dyn | 6 +++--- .../Samples/es-ES/Revit/Revit Import Solid.dyn | 4 ++-- .../Samples/fr-FR/Revit/Revit Import Solid.dyn | 4 ++-- .../Samples/it-IT/Revit/Revit Import Solid.dyn | 2 +- .../Samples/ja-JP/Revit/Revit Import Solid.dyn | 4 ++-- .../Samples/ko-KR/Revit/Revit Import Solid.dyn | 4 ++-- .../Samples/pl-PL/Revit/Revit Import Solid.dyn | 4 ++-- .../Samples/pt-BR/Revit/Revit Import Solid.dyn | 2 +- .../Samples/ru-RU/Revit/Revit Import Solid.dyn | 2 +- .../Samples/zh-CN/Revit/Revit Import Solid.dyn | 2 +- .../Samples/zh-TW/Revit/Revit Import Solid.dyn | 4 ++-- .../RevitIntegrationTests/OOTB_D4R_SampleTests.cs | 14 +++++++------- 15 files changed, 31 insertions(+), 31 deletions(-) diff --git a/doc/distrib/Samples/cs-CZ/Revit/Revit Import Solid.dyn b/doc/distrib/Samples/cs-CZ/Revit/Revit Import Solid.dyn index 568fa1260..75c05adeb 100644 --- a/doc/distrib/Samples/cs-CZ/Revit/Revit Import Solid.dyn +++ b/doc/distrib/Samples/cs-CZ/Revit/Revit Import Solid.dyn @@ -1204,7 +1204,7 @@ ], "Replication": "Disabled", "Description": "Umožňuje přímé vytváření kódu DesignScript.", - "Code": "\"Pracovní rovina\";" + "Code": "\"Úroveň\";" }, { "ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI", diff --git a/doc/distrib/Samples/de-DE/Revit/Revit Import Solid.dyn b/doc/distrib/Samples/de-DE/Revit/Revit Import Solid.dyn index 56490227c..2400a8688 100644 --- a/doc/distrib/Samples/de-DE/Revit/Revit Import Solid.dyn +++ b/doc/distrib/Samples/de-DE/Revit/Revit Import Solid.dyn @@ -1195,7 +1195,7 @@ { "Id": "642fda9615c84dd3acf612b2cc1bd1c8", "Name": "string", - "Description": "\"Arbeitsebene\"", + "Description": "\"Ebene\"", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, @@ -1204,7 +1204,7 @@ ], "Replication": "Disabled", "Description": "Ermöglicht die direkte Erstellung von DesignScript-Code.", - "Code": "\"Arbeitsebene\";" + "Code": "\"Ebene\";" }, { "ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI", diff --git a/doc/distrib/Samples/en-GB/Revit/Revit Import Solid.dyn b/doc/distrib/Samples/en-GB/Revit/Revit Import Solid.dyn index edcfd6895..4c94d1da8 100644 --- a/doc/distrib/Samples/en-GB/Revit/Revit Import Solid.dyn +++ b/doc/distrib/Samples/en-GB/Revit/Revit Import Solid.dyn @@ -1195,7 +1195,7 @@ { "Id": "642fda9615c84dd3acf612b2cc1bd1c8", "Name": "string", - "Description": "\"Work Plane\"", + "Description": "\"Level\"", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, @@ -1204,7 +1204,7 @@ ], "Replication": "Disabled", "Description": "Allows for DesignScript code to be authored directly", - "Code": "\"Work Plane\";" + "Code": "\"Level\";" }, { "ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI", diff --git a/doc/distrib/Samples/en-US/Revit/Revit Import Solid.dyn b/doc/distrib/Samples/en-US/Revit/Revit Import Solid.dyn index edcfd6895..6612a7740 100644 --- a/doc/distrib/Samples/en-US/Revit/Revit Import Solid.dyn +++ b/doc/distrib/Samples/en-US/Revit/Revit Import Solid.dyn @@ -1195,7 +1195,7 @@ { "Id": "642fda9615c84dd3acf612b2cc1bd1c8", "Name": "string", - "Description": "\"Work Plane\"", + "Description": "\"Level\"", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, @@ -1204,7 +1204,7 @@ ], "Replication": "Disabled", "Description": "Allows for DesignScript code to be authored directly", - "Code": "\"Work Plane\";" + "Code": "\"Level\";" }, { "ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI", @@ -3567,7 +3567,7 @@ }, { "Id": "3384eaf2af26445291a1584055510725", - "Title": "Correct the height of the placed Import Instance by setting the Work Plane parameter to the Level which elevation matches the Internal Origin position.", + "Title": "Correct the height of the placed Import Instance by setting the Level parameter to the Level which elevation matches the Internal Origin position.", "DescriptionText": null, "IsExpanded": true, "WidthAdjustment": 0.0, diff --git a/doc/distrib/Samples/es-ES/Revit/Revit Import Solid.dyn b/doc/distrib/Samples/es-ES/Revit/Revit Import Solid.dyn index 04ac57f06..ac7c89daf 100644 --- a/doc/distrib/Samples/es-ES/Revit/Revit Import Solid.dyn +++ b/doc/distrib/Samples/es-ES/Revit/Revit Import Solid.dyn @@ -1195,7 +1195,7 @@ { "Id": "642fda9615c84dd3acf612b2cc1bd1c8", "Name": "string", - "Description": "\"Plano de trabajo\"", + "Description": "\"Nivel\"", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, @@ -1204,7 +1204,7 @@ ], "Replication": "Disabled", "Description": "Permite creación directa de código de DesignScript", - "Code": "\"Plano de trabajo\";" + "Code": "\"Nivel\";" }, { "ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI", diff --git a/doc/distrib/Samples/fr-FR/Revit/Revit Import Solid.dyn b/doc/distrib/Samples/fr-FR/Revit/Revit Import Solid.dyn index bfefa265c..b9e5318ad 100644 --- a/doc/distrib/Samples/fr-FR/Revit/Revit Import Solid.dyn +++ b/doc/distrib/Samples/fr-FR/Revit/Revit Import Solid.dyn @@ -1195,7 +1195,7 @@ { "Id": "642fda9615c84dd3acf612b2cc1bd1c8", "Name": "string", - "Description": "\"Plan de construction\"", + "Description": "\"Niveau\"", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, @@ -1204,7 +1204,7 @@ ], "Replication": "Disabled", "Description": "Permet de créer le code DesignScript directement", - "Code": "\"Plan de construction\";" + "Code": "\"Niveau\";" }, { "ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI", diff --git a/doc/distrib/Samples/it-IT/Revit/Revit Import Solid.dyn b/doc/distrib/Samples/it-IT/Revit/Revit Import Solid.dyn index 8bc5cca76..911949a1b 100644 --- a/doc/distrib/Samples/it-IT/Revit/Revit Import Solid.dyn +++ b/doc/distrib/Samples/it-IT/Revit/Revit Import Solid.dyn @@ -1204,7 +1204,7 @@ ], "Replication": "Disabled", "Description": "Consente la creazione diretta di codice DesignScript", - "Code": "\"Piano di lavoro\";" + "Code": "\"Livello\";" }, { "ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI", diff --git a/doc/distrib/Samples/ja-JP/Revit/Revit Import Solid.dyn b/doc/distrib/Samples/ja-JP/Revit/Revit Import Solid.dyn index c861dbfe9..4719a45df 100644 --- a/doc/distrib/Samples/ja-JP/Revit/Revit Import Solid.dyn +++ b/doc/distrib/Samples/ja-JP/Revit/Revit Import Solid.dyn @@ -1195,7 +1195,7 @@ { "Id": "642fda9615c84dd3acf612b2cc1bd1c8", "Name": "string", - "Description": "\"作業面\"", + "Description": "\"レベル\"", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, @@ -1204,7 +1204,7 @@ ], "Replication": "Disabled", "Description": "DesignScript のコードを直接作成することができます。", - "Code": "\"作業面\";" + "Code": "\"レベル\";" }, { "ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI", diff --git a/doc/distrib/Samples/ko-KR/Revit/Revit Import Solid.dyn b/doc/distrib/Samples/ko-KR/Revit/Revit Import Solid.dyn index 82759b6f3..a03fe5776 100644 --- a/doc/distrib/Samples/ko-KR/Revit/Revit Import Solid.dyn +++ b/doc/distrib/Samples/ko-KR/Revit/Revit Import Solid.dyn @@ -1195,7 +1195,7 @@ { "Id": "642fda9615c84dd3acf612b2cc1bd1c8", "Name": "string", - "Description": "\"작업 기준면\"", + "Description": "\"레벨\"", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, @@ -1204,7 +1204,7 @@ ], "Replication": "Disabled", "Description": "DesignScript 코드를 직접 작성할 수 있습니다", - "Code": "\"작업 기준면\";" + "Code": "\"레벨\";" }, { "ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI", diff --git a/doc/distrib/Samples/pl-PL/Revit/Revit Import Solid.dyn b/doc/distrib/Samples/pl-PL/Revit/Revit Import Solid.dyn index c32ed645f..92fb2c1fc 100644 --- a/doc/distrib/Samples/pl-PL/Revit/Revit Import Solid.dyn +++ b/doc/distrib/Samples/pl-PL/Revit/Revit Import Solid.dyn @@ -1195,7 +1195,7 @@ { "Id": "642fda9615c84dd3acf612b2cc1bd1c8", "Name": "string", - "Description": "\"Płaszczyzna robocza\"", + "Description": "\"Poziom\"", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, @@ -1204,7 +1204,7 @@ ], "Replication": "Disabled", "Description": "Umożliwia bezpośrednie utworzenie kodu DesignScript.", - "Code": "\"Płaszczyzna robocza\";" + "Code": "\"Poziom\";" }, { "ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI", diff --git a/doc/distrib/Samples/pt-BR/Revit/Revit Import Solid.dyn b/doc/distrib/Samples/pt-BR/Revit/Revit Import Solid.dyn index 15214944b..9dd4e222c 100644 --- a/doc/distrib/Samples/pt-BR/Revit/Revit Import Solid.dyn +++ b/doc/distrib/Samples/pt-BR/Revit/Revit Import Solid.dyn @@ -1204,7 +1204,7 @@ ], "Replication": "Disabled", "Description": "Permite que o código DesignScript seja criado diretamente", - "Code": "\"Plano de trabalho\";" + "Code": "\"Nível\";" }, { "ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI", diff --git a/doc/distrib/Samples/ru-RU/Revit/Revit Import Solid.dyn b/doc/distrib/Samples/ru-RU/Revit/Revit Import Solid.dyn index 0c5f9b876..73d3d9ff7 100644 --- a/doc/distrib/Samples/ru-RU/Revit/Revit Import Solid.dyn +++ b/doc/distrib/Samples/ru-RU/Revit/Revit Import Solid.dyn @@ -1204,7 +1204,7 @@ ], "Replication": "Disabled", "Description": "Обеспечивает возможность непосредственного авторства кода DesignScript", - "Code": "\"Рабочая плоскость\";" + "Code": "\"Уровень\";" }, { "ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI", diff --git a/doc/distrib/Samples/zh-CN/Revit/Revit Import Solid.dyn b/doc/distrib/Samples/zh-CN/Revit/Revit Import Solid.dyn index ab72ef116..499f7642f 100644 --- a/doc/distrib/Samples/zh-CN/Revit/Revit Import Solid.dyn +++ b/doc/distrib/Samples/zh-CN/Revit/Revit Import Solid.dyn @@ -1204,7 +1204,7 @@ ], "Replication": "Disabled", "Description": "允许直接编写 DesignScript 代码", - "Code": "\"工作平面\";" + "Code": "\"标高\";" }, { "ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI", diff --git a/doc/distrib/Samples/zh-TW/Revit/Revit Import Solid.dyn b/doc/distrib/Samples/zh-TW/Revit/Revit Import Solid.dyn index 403c4e27a..320d1f6cd 100644 --- a/doc/distrib/Samples/zh-TW/Revit/Revit Import Solid.dyn +++ b/doc/distrib/Samples/zh-TW/Revit/Revit Import Solid.dyn @@ -1195,7 +1195,7 @@ { "Id": "642fda9615c84dd3acf612b2cc1bd1c8", "Name": "string", - "Description": "\"工作平面\"", + "Description": "\"樓層\"", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, @@ -1204,7 +1204,7 @@ ], "Replication": "Disabled", "Description": "允許直接編寫 DesignScript 程式碼", - "Code": "\"工作平面\";" + "Code": "\"樓層\";" }, { "ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI", diff --git a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs index 124c3d23f..a0ed6e411 100644 --- a/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs +++ b/test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs @@ -64,7 +64,7 @@ public void Revit_Geometry_Creation_Points() } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] + [TestModel(@".\Snowdon Towers Sample Architectural.rvt")] public void Revit_Geometry_Creation_Curves() { OpenAndRunSample("Revit Geometry Creation Curves.dyn"); @@ -85,42 +85,42 @@ public void Revit_Geometry_Creation_Surfaces() } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] + [TestModel(@".\DynamoSample_2021.rvt")] public void OOTB_Revit_Adaptive_Component_Placement() { OpenAndRunSample("Revit Adaptive Component Placement.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] + [TestModel(@".\Snowdon Towers Sample Architectural.rvt")] public void OOTB_Revit_Color() { OpenAndRunSample("Revit Color.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] + [TestModel(@".\Snowdon Towers Sample Architectural.rvt")] public void OOTB_Revit_Floors_and_Framing() { OpenAndRunSample("Revit Floors and Framing.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] + [TestModel(@".\Snowdon Towers Sample Architectural.rvt")] public void Revit_Import_Solid() { OpenAndRunSample("Revit Import Solid.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] + [TestModel(@".\Snowdon Towers Sample Architectural.rvt")] public void Revit_Place_Families_By_Level_Set_Parameters() { OpenAndRunSample("Revit Place Families By Level Set Parameters.dyn"); } [Test, Category("SmokeTests")] - [TestModel(@".\Samples\Snowdon Towers Sample Architectural.rvt")] + [TestModel(@".\Snowdon Towers Sample Architectural.rvt")] public void Revit_Structural_Framing() { OpenAndRunSample("Revit Structural Framing.dyn");