Skip to content

Commit

Permalink
#51 first test fixture _ report all fails at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
Elcin committed Jun 30, 2015
1 parent 178356e commit 327b978
Show file tree
Hide file tree
Showing 7 changed files with 1,688 additions and 11 deletions.
19 changes: 19 additions & 0 deletions packages/DynamoSAP/extra/RevitTestFramework.addin
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<RevitAddIns>
<AddIn Type="Application">
<Name>Dynamo Test Framework App</Name>
<Assembly>"C:\Users\eertugrul\Documents\GitHub\RevitTestFramework\bin\AnyCPU\Debug\RTFRevit.dll"</Assembly>
<AddInId>c950020f-3da0-4e48-ab82-5e30c3f4b345</AddInId>
<FullClassName>RTF.Applications.RevitTestFrameworkExternalApp</FullClassName>
<VendorId>Dynamo</VendorId>
<VendorDescription>Dynamo</VendorDescription>
</AddIn>
<AddIn Type="Command">
<Name>Dynamo Test Framework</Name>
<Assembly>"C:\Users\eertugrul\Documents\GitHub\RevitTestFramework\bin\AnyCPU\Debug\RTFRevit.dll"</Assembly>
<AddInId>487f9ff0-5b34-4e7e-97bf-70fbff69194f</AddInId>
<FullClassName>RTF.Applications.RevitTestFramework</FullClassName>
<VendorId>Dynamo</VendorId>
<VendorDescription>Dynamo</VendorDescription>
</AddIn>
</RevitAddIns>
671 changes: 671 additions & 0 deletions packages/DynamoSAP/extra/journal.0002.txt

Large diffs are not rendered by default.

916 changes: 916 additions & 0 deletions packages/DynamoSAP/extra/journal.0003.txt

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions packages/DynamoSAP/extra/mmgr.log
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,27 @@ Mismatched caller pointers: 0
Mismatched sizes pointers: 0
Pre-initialization allocations: 0
*** End ASM Memory Statistics ***
*** Beginning ASM Leak Dump ***
Heap auditing not enabled

*** Statistics ***
No leaks
0 allocations for 0 bytes
0 deletes for 0 bytes
High-water-mark: 0 bytes
Mismatched caller pointers: 0
Mismatched sizes pointers: 0
Pre-initialization allocations: 0
*** End ASM Memory Statistics ***
*** Beginning ASM Leak Dump ***
Heap auditing not enabled

*** Statistics ***
No leaks
0 allocations for 0 bytes
0 deletes for 0 bytes
High-water-mark: 0 bytes
Mismatched caller pointers: 0
Mismatched sizes pointers: 0
Pre-initialization allocations: 0
*** End ASM Memory Statistics ***
29 changes: 29 additions & 0 deletions packages/DynamoSAP_RTF.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Runner xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AssemblyPath>C:\Users\eertugrul\Documents\GitHub\RevitTestFramework\bin\AnyCPU\Debug\RTFRevit.dll</AssemblyPath>
<TestAssembly>C:\Users\eertugrul\Documents\GitHub\DynamoSAP\bin\AnyCPU\Debug\DynamoSAPTests.dll</TestAssembly>
<IsDebug>false</IsDebug>
<Results>C:\Users\eertugrul\Desktop\delete_\RTF Test\DynSAPTest.xml</Results>
<WorkingDirectory>C:\Users\eertugrul\Documents\GitHub\DynamoSAP\packages\DynamoSAP\extra</WorkingDirectory>
<RevitPath>C:\Program Files\Autodesk\Revit 2014\revit.exe</RevitPath>
<CopyAddins>true</CopyAddins>
<Timeout>120000</Timeout>
<Concat>false</Concat>
<CancelRequested>false</CancelRequested>
<DryRun>false</DryRun>
<CleanUp>true</CleanUp>
<Continuous>false</Continuous>
<SelectionHints>
<SelectionHint>
<AssemblyName>DynamoSAPTests</AssemblyName>
<FixtureName>DynamoSAP_SystemTesting</FixtureName>
<TestName>SpaceStructure</TestName>
</SelectionHint>
</SelectionHints>
<GroupingType>Fixture</GroupingType>
<IsTesting>false</IsTesting>
<AdditionalResolutionDirectories>
<string>C:\Program Files\Dynamo 0.8</string>
<string> C:\Program Files\Dynamo 0.8\Revit_2014</string>
</AdditionalResolutionDirectories>
</Runner>
8 changes: 5 additions & 3 deletions src/DynamoSAP.sln
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DynamoSAP", "DynamoSAP\DynamoSAP.csproj", "{6DA1EAC6-BAE8-4A05-8880-24CC11EAB491}"
ProjectSection(ProjectDependencies) = postProject
{C9658348-ABB5-4369-80B9-EB46F21DF577} = {C9658348-ABB5-4369-80B9-EB46F21DF577}
Expand All @@ -14,6 +12,10 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DynamoSAP_UI", "DynamoSAP_UI\DynamoSAP_UI.csproj", "{EABB6380-E55A-4726-8355-46DFD260E878}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DynamoSAPTests", "DynamoSAPTests\DynamoSAPTests.csproj", "{1574EBAF-CED5-46B6-8FBC-DC6C96A27688}"
ProjectSection(ProjectDependencies) = postProject
{C9658348-ABB5-4369-80B9-EB46F21DF577} = {C9658348-ABB5-4369-80B9-EB46F21DF577}
{6DA1EAC6-BAE8-4A05-8880-24CC11EAB491} = {6DA1EAC6-BAE8-4A05-8880-24CC11EAB491}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
32 changes: 24 additions & 8 deletions src/DynamoSAPTests/SystemTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

using DynamoSAP;
using SAP2000v16;
using System;

namespace DynamoSAPTests
{
Expand All @@ -28,12 +29,12 @@ public void Setup()
}

/// <summary>
/// No Need for Revit model !!!
/// Test Model Revit model
/// </summary>
[Test, TestModel(@".\TestModel.rvt")]
public void DefineStructure()
public void SpaceStructure()
{
// Launch SAP2000v16 and Open
// Launch SAP2000v16 and Open a blank model
SapObject mySapObject = null;
cSapModel mySapModel = null;
SAPConnection.Initialize.InitializeSapModel(ref mySapObject, ref mySapModel, "kip_ft_F");
Expand All @@ -42,38 +43,53 @@ public void DefineStructure()
OpenAndRunDynamoDefinition(@".\Sample_1a_SpaceStructure.dyn");

// Test Logic is here --->
string failreport = string.Empty;

// Check dropdown Material Types
var material = (string)GetPreviewValue("89e9e6aa-5ea9-4641-8bee-743b2173ada1");
if (material != "A992Fy50") Assert.Fail("The node called '" + "Materials Dropdown" + "' returns wrong result !");
if (material != "A992Fy50") failreport = string.Format(failreport + "{0}{1}", Environment.NewLine, "The node called '" + "Materials Dropdown" + "' returns wrong result !");
//Assert.Fail("The node called '" + "Materials Dropdown" + "' returns wrong result !");

// Check dropdown Section Catalog Types
var sectionCatalog = (string)GetPreviewValue("579cbea6-5b14-4023-bfef-44fde2eff3ee");
if (sectionCatalog != "AISC14") Assert.Fail("The node called '" + "Section Catalog Dropdown" + "' returns wrong result !");
if (sectionCatalog != "AISC14") failreport = string.Format(failreport + "{0}{1}", Environment.NewLine, "The node called '" + "Section Catalog Dropdown" + "' returns wrong result !");
//Assert.Fail("The node called '" + "Section Catalog Dropdown" + "' returns wrong result !");

// Check Section Name read from SAP
var sectionName = (string)GetPreviewValue("ba2e32bc-89b3-4566-9555-de98e9e98c2b");
if (sectionName != "HSS5.563X.375") Assert.Fail("The node called '" + "Section Name" + "' returns wrong result !");
if (sectionName != "HSS5.563X.375") failreport = string.Format(failreport + "{0}{1}", Environment.NewLine, "The node called '" + "Section Name" + "' returns wrong result !");
//Assert.Fail("The node called '" + "Section Name" + "' returns wrong result !");

// Check dropdown Units
var units = (string)GetPreviewValue("aa80e305-bb4a-418b-87f4-022dd0268680");
if (units == "kip_ft_F") failreport = string.Format(failreport + "{0}{1}", Environment.NewLine, "The node called '" + "Units" + "' returns wrong result !");
//Assert.Fail("The node called '" + "Units" + "' returns wrong result !");


// Check Node Frame.FromLine
if (IsNodeInErrorOrWarningState("73b79339-e8d9-4841-ac63-12d45e184b2f"))
{
Assert.Fail("The node called '" + "Frame.FromLine" + "' failed or threw a warning.");
failreport = string.Format(failreport + "{0}{1}", Environment.NewLine, "The node called '" + "Frame.FromLine" + "' failed or threw a warning.");
//Assert.Fail("The node called '" + "Frame.FromLine" + "' failed or threw a warning.");
}

// Check Node Bake to SAP
if (IsNodeInErrorOrWarningState("d86c67da-ff87-4c04-8976-c7a00a640518"))
{
Assert.Fail("The node called '" + "Bake.toSAP" + "' failed or threw a warning.");
failreport = string.Format(failreport + "{0}{1}", Environment.NewLine, "The node called '" + "Bake.toSAP" + "' failed or threw a warning.");
//Assert.Fail("The node called '" + "Bake.toSAP" + "' failed or threw a warning.");
}

// Set SAP instances to null;
mySapObject.ApplicationExit(false);
mySapObject = null;
mySapModel = null;

if (!string.IsNullOrEmpty(failreport))
{
Assert.Fail(failreport);
}

//if we got here, nothing failed.
Assert.Pass();
}
Expand Down

0 comments on commit 327b978

Please sign in to comment.