Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6810393
REVIT-238057: Add OOTB D4R sample tests with SetupUnzip
Apr 6, 2026
1cdaf61
REVIT-238057: Address PR review — refactor OOTB_D4R_Tests
Apr 23, 2026
6714972
REVIT-238057: Update .gitignore to include packages directory
Apr 23, 2026
cd29ffc
Add logs directory to .gitignore to prevent tracking log files
Apr 23, 2026
a65d381
REVIT-238057: Add explicit using System for InvalidOperationException
Apr 23, 2026
28ffb6c
REVIT-238057: Update OOTB D4R sample tests to use correct models per …
Apr 27, 2026
09dbecb
Address PR feedback: rename class, add node warning check, extract to…
May 6, 2026
7d09993
Fix test model paths to use models available in repo
May 6, 2026
cccade8
Use version-keyed temp cache with atomic extraction
May 6, 2026
1718dcf
Add cache fallback when zip is absent
May 6, 2026
8ed8cac
Comment out zip extraction priorities, keep for future use
May 6, 2026
719f06e
Rename SetupUnzip to ResolveSamplePath, add locale probe, sort diagno…
May 6, 2026
bd26668
Fix double semicolon, add comment clarifying SamplesPath distinction
May 6, 2026
cb5cc31
Add graph-loaded assertion, clarify assembly location pattern
May 6, 2026
a1611aa
Improve assertion diagnostics: show node messages and connector details
May 8, 2026
090ca0f
REVIT-238057: Trim OOTB smoke test fixture (ponytail review)
Jul 22, 2026
076242c
REVIT-238057: Align StructuralFraming TestModel with journal path
Jul 22, 2026
74eed48
REVIT-238057: Harden OOTB smoke tests for graph execution
Jul 24, 2026
b7c6314
REVIT-238057: Use empty.rfa for OOTB Solids smoke test
Jul 27, 2026
145fcc4
Use DynamoSample_2020.rvt for OOTB sample-model smoke tests.
Jul 27, 2026
c3036d9
OOTB smoke: fail on Error only and rename colliding test names.
Jul 28, 2026
bd1d8b2
OOTB smoke: trim ResolveSamplePath and drop unrelated gitignore noise.
Jul 28, 2026
773f288
OOTB smoke: restore Warning checks and align TestModel with sample In…
Jul 29, 2026
ff6c8c2
Fix OOTB triage failures: DynamoSample model and Import Solid Level p…
Jul 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
Expand All @@ -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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,4 @@ test/**/*.addin
test/SystemInJson

# Icon resources
/src/DynamoRevitIcons/*.resources
/src/DynamoRevitIcons/*.resources
2 changes: 1 addition & 1 deletion doc/distrib/Samples/cs-CZ/Revit/Revit Import Solid.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions doc/distrib/Samples/de-DE/Revit/Revit Import Solid.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@
{
"Id": "642fda9615c84dd3acf612b2cc1bd1c8",
"Name": "string",
"Description": "\"Arbeitsebene\"",
"Description": "\"Ebene\"",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
Expand All @@ -1204,7 +1204,7 @@
],
"Replication": "Disabled",
"Description": "Ermöglicht die direkte Erstellung von DesignScript-Code.",
"Code": "\"Arbeitsebene\";"
"Code": "\"Ebene\";"
},
{
"ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI",
Expand Down
4 changes: 2 additions & 2 deletions doc/distrib/Samples/en-GB/Revit/Revit Import Solid.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@
{
"Id": "642fda9615c84dd3acf612b2cc1bd1c8",
"Name": "string",
"Description": "\"Work Plane\"",
"Description": "\"Level\"",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
Expand All @@ -1204,7 +1204,7 @@
],
"Replication": "Disabled",
"Description": "Allows for DesignScript code to be authored directly",
"Code": "\"Work Plane\";"
"Code": "\"Level\";"
},
{
"ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI",
Expand Down
6 changes: 3 additions & 3 deletions doc/distrib/Samples/en-US/Revit/Revit Import Solid.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@
{
"Id": "642fda9615c84dd3acf612b2cc1bd1c8",
"Name": "string",
"Description": "\"Work Plane\"",
"Description": "\"Level\"",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
Expand All @@ -1204,7 +1204,7 @@
],
"Replication": "Disabled",
"Description": "Allows for DesignScript code to be authored directly",
"Code": "\"Work Plane\";"
"Code": "\"Level\";"
},
{
"ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI",
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions doc/distrib/Samples/es-ES/Revit/Revit Import Solid.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@
{
"Id": "642fda9615c84dd3acf612b2cc1bd1c8",
"Name": "string",
"Description": "\"Plano de trabajo\"",
"Description": "\"Nivel\"",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions doc/distrib/Samples/fr-FR/Revit/Revit Import Solid.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@
{
"Id": "642fda9615c84dd3acf612b2cc1bd1c8",
"Name": "string",
"Description": "\"Plan de construction\"",
"Description": "\"Niveau\"",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion doc/distrib/Samples/it-IT/Revit/Revit Import Solid.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@
],
"Replication": "Disabled",
"Description": "Consente la creazione diretta di codice DesignScript",
"Code": "\"Piano di lavoro\";"
"Code": "\"Livello\";"
},
{
"ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI",
Expand Down
4 changes: 2 additions & 2 deletions doc/distrib/Samples/ja-JP/Revit/Revit Import Solid.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@
{
"Id": "642fda9615c84dd3acf612b2cc1bd1c8",
"Name": "string",
"Description": "\"作業面\"",
"Description": "\"レベル\"",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
Expand All @@ -1204,7 +1204,7 @@
],
"Replication": "Disabled",
"Description": "DesignScript のコードを直接作成することができます。",
"Code": "\"作業面\";"
"Code": "\"レベル\";"
},
{
"ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI",
Expand Down
4 changes: 2 additions & 2 deletions doc/distrib/Samples/ko-KR/Revit/Revit Import Solid.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@
{
"Id": "642fda9615c84dd3acf612b2cc1bd1c8",
"Name": "string",
"Description": "\"작업 기준면\"",
"Description": "\"레벨\"",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
Expand All @@ -1204,7 +1204,7 @@
],
"Replication": "Disabled",
"Description": "DesignScript 코드를 직접 작성할 수 있습니다",
"Code": "\"작업 기준면\";"
"Code": "\"레벨\";"
},
{
"ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI",
Expand Down
4 changes: 2 additions & 2 deletions doc/distrib/Samples/pl-PL/Revit/Revit Import Solid.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@
{
"Id": "642fda9615c84dd3acf612b2cc1bd1c8",
"Name": "string",
"Description": "\"Płaszczyzna robocza\"",
"Description": "\"Poziom\"",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
Expand All @@ -1204,7 +1204,7 @@
],
"Replication": "Disabled",
"Description": "Umożliwia bezpośrednie utworzenie kodu DesignScript.",
"Code": "\"Płaszczyzna robocza\";"
"Code": "\"Poziom\";"
},
{
"ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI",
Expand Down
2 changes: 1 addition & 1 deletion doc/distrib/Samples/pt-BR/Revit/Revit Import Solid.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion doc/distrib/Samples/ru-RU/Revit/Revit Import Solid.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@
],
"Replication": "Disabled",
"Description": "Обеспечивает возможность непосредственного авторства кода DesignScript",
"Code": "\"Рабочая плоскость\";"
"Code": "\"Уровень\";"
},
{
"ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI",
Expand Down
2 changes: 1 addition & 1 deletion doc/distrib/Samples/zh-CN/Revit/Revit Import Solid.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@
],
"Replication": "Disabled",
"Description": "允许直接编写 DesignScript 代码",
"Code": "\"工作平面\";"
"Code": "\"标高\";"
},
{
"ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI",
Expand Down
4 changes: 2 additions & 2 deletions doc/distrib/Samples/zh-TW/Revit/Revit Import Solid.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@
{
"Id": "642fda9615c84dd3acf612b2cc1bd1c8",
"Name": "string",
"Description": "\"工作平面\"",
"Description": "\"樓層\"",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
Expand All @@ -1204,7 +1204,7 @@
],
"Replication": "Disabled",
"Description": "允許直接編寫 DesignScript 程式碼",
"Code": "\"工作平面\";"
"Code": "\"樓層\";"
},
{
"ConcreteType": "DSRevitNodesUI.Levels, DSRevitNodesUI",
Expand Down
129 changes: 129 additions & 0 deletions test/Libraries/RevitIntegrationTests/OOTB_D4R_SampleTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
using System;
using System.IO;
using System.Linq;
using System.Reflection;
using Dynamo.Graph.Nodes;
using NUnit.Framework;
using RevitTestServices;
using RTF.Framework;

namespace RevitSystemTests
{
[TestFixture]
class OOTB_D4R_SampleTests : RevitSystemTestBase
{
private static string ResolveSamplePath(string scriptFileName)
{
string assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string parentDir = Path.GetDirectoryName(assemblyDir);
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}' under {Path.Combine(parentDir, "samples")}.");
}

private void OpenAndRunSample(string scriptFileName)
{
string testPath = Path.GetFullPath(ResolveSamplePath(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();

var brokenConnectors = ViewModel.Model.CurrentWorkspace.Connectors
.Where(c => c.Start == null || c.End == null).ToList();
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();
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/warning in '{scriptFileName}'. " +
$"First: [{first.State}] {first.Name}" + (msg != null ? $": {msg}" : string.Empty));
}
}

[Test, Category("SmokeTests")]
[TestModel(@".\AdaptiveComponents.rfa")]
public void Revit_Geometry_Creation_Points()
{
OpenAndRunSample("Revit Geometry Creation Points.dyn");
}

[Test, Category("SmokeTests")]
[TestModel(@".\Snowdon Towers Sample Architectural.rvt")]
public void Revit_Geometry_Creation_Curves()
{
OpenAndRunSample("Revit Geometry Creation Curves.dyn");
}

[Test, Category("SmokeTests")]
[TestModel(@".\empty.rfa")]
public void Revit_Geometry_Creation_Solids()
{
OpenAndRunSample("Revit Geometry Creation Solids.dyn");
}

[Test, Category("SmokeTests")]
[TestModel(@".\empty.rfa")]
public void Revit_Geometry_Creation_Surfaces()
{
OpenAndRunSample("Revit Geometry Creation Surfaces.dyn");
}

[Test, Category("SmokeTests")]
[TestModel(@".\DynamoSample_2021.rvt")]
public void OOTB_Revit_Adaptive_Component_Placement()
{
OpenAndRunSample("Revit Adaptive Component Placement.dyn");
}

[Test, Category("SmokeTests")]
[TestModel(@".\Snowdon Towers Sample Architectural.rvt")]
public void OOTB_Revit_Color()
{
OpenAndRunSample("Revit Color.dyn");
}

[Test, Category("SmokeTests")]
[TestModel(@".\Snowdon Towers Sample Architectural.rvt")]
public void OOTB_Revit_Floors_and_Framing()
{
OpenAndRunSample("Revit Floors and Framing.dyn");
}

[Test, Category("SmokeTests")]
[TestModel(@".\Snowdon Towers Sample Architectural.rvt")]
public void Revit_Import_Solid()
{
OpenAndRunSample("Revit Import Solid.dyn");
}

[Test, Category("SmokeTests")]
[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(@".\Snowdon Towers Sample Architectural.rvt")]
public void Revit_Structural_Framing()
Comment thread
Fusneica-FlorentinCristian marked this conversation as resolved.
{
OpenAndRunSample("Revit Structural Framing.dyn");
}
}
}
3 changes: 3 additions & 0 deletions test/System/Samples/Snowdon Towers Sample Architectural.rvt
Git LFS file not shown