specklesystems / xUnitRevit

xUnit runner for Revit
https://speckle.systems/blog/xunitrevit/
MIT License
121 stars 44 forks source link

Can't run tests #13

Closed mossherder closed 2 years ago

mossherder commented 2 years ago

Steps taken

"Run All" and "Run Selected" are always greyed out.

Not sure what other information I can provide, but had a friend try also and they had the same issue.

image

teocomi commented 2 years ago

The panel on the right should be showing the list of available tests, since none is visible I'd guess that maybe the sample library was not loaded correctly... Maybe some references are missing? Any errors if you debug it?

mossherder commented 2 years ago

Sweet, thanks @teocomi !

Got it working. It was related to references, I think. I upgraded the versions of the ModPlus and xUnitRevitUtils libraries and it works now!

here's a patch in case it's helpful to someone..

From 4953363aadf87f0f78802f21ef72862668685f81 Mon Sep 17 00:00:00 2001
From: xxx <xxx@gmail.com>
Date: Wed, 26 Jan 2022 09:33:11 -0700
Subject: [PATCH] version issue fix?

---
 SampleLibrary/SampleLibrary.csproj            | 24 ++++++++++---------
 SampleLibrary/packages.config                 |  4 ++--
 config.json                                   |  4 ++++
 xUnitRevit/xUnitRevit.csproj                  |  3 ++-
 .../xUnitRevitUtils2020.csproj                |  2 +-
 .../xUnitRevitUtils2021.csproj                |  2 +-
 6 files changed, 23 insertions(+), 16 deletions(-)
 create mode 100644 config.json

diff --git a/SampleLibrary/SampleLibrary.csproj b/SampleLibrary/SampleLibrary.csproj
index d82da80..01a64a1 100644
--- a/SampleLibrary/SampleLibrary.csproj
+++ b/SampleLibrary/SampleLibrary.csproj
@@ -36,17 +36,16 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="AdWindows, Version=3.0.4.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\ModPlus.Revit.API.2021.1.0.0\lib\AdWindows.dll</HintPath>
+      <HintPath>..\packages\ModPlus.Revit.API.2021.3.0.0\lib\AdWindows.dll</HintPath>
     </Reference>
     <Reference Include="RevitAPI, Version=21.0.0.0, Culture=neutral, processorArchitecture=AMD64">
-      <HintPath>..\packages\ModPlus.Revit.API.2021.1.0.0\lib\RevitAPI.dll</HintPath>
+      <HintPath>..\packages\ModPlus.Revit.API.2021.3.0.0\lib\RevitAPI.dll</HintPath>
     </Reference>
     <Reference Include="RevitAPIIFC, Version=21.0.0.0, Culture=neutral, processorArchitecture=AMD64">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>.\RevitAPIIFC.dll</HintPath>
+      <HintPath>..\packages\ModPlus.Revit.API.2021.3.0.0\lib\RevitAPIIFC.dll</HintPath>
     </Reference>
     <Reference Include="RevitAPIUI, Version=21.0.0.0, Culture=neutral, processorArchitecture=AMD64">
-      <HintPath>..\packages\ModPlus.Revit.API.2021.1.0.0\lib\RevitAPIUI.dll</HintPath>
+      <HintPath>..\packages\ModPlus.Revit.API.2021.3.0.0\lib\RevitAPIUI.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
@@ -56,6 +55,12 @@
     <Reference Include="System.Data" />
     <Reference Include="System.Net.Http" />
     <Reference Include="System.Xml" />
+    <Reference Include="UIFramework, Version=21.0.0.0, Culture=neutral, processorArchitecture=AMD64">
+      <HintPath>..\packages\ModPlus.Revit.API.2021.3.0.0\lib\UIFramework.dll</HintPath>
+    </Reference>
+    <Reference Include="Xceed.Wpf.AvalonDock, Version=2.0.19.12, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
+      <HintPath>..\packages\ModPlus.Revit.API.2021.3.0.0\lib\Xceed.Wpf.AvalonDock.dll</HintPath>
+    </Reference>
     <Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
       <HintPath>..\packages\xunit.abstractions.2.0.3\lib\net35\xunit.abstractions.dll</HintPath>
     </Reference>
@@ -68,6 +73,9 @@
     <Reference Include="xunit.execution.desktop, Version=2.4.1.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
       <HintPath>..\packages\xunit.extensibility.execution.2.4.1\lib\net452\xunit.execution.desktop.dll</HintPath>
     </Reference>
+    <Reference Include="xUnitRevitUtils, Version=1.0.4.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\packages\xUnitRevitUtils.2021.1.0.4\lib\netstandard2.0\xUnitRevitUtils.dll</HintPath>
+    </Reference>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="SampleTest.cs" />
@@ -81,12 +89,6 @@
   <ItemGroup>
     <Analyzer Include="..\packages\xunit.analyzers.0.10.0\analyzers\dotnet\cs\xunit.analyzers.dll" />
   </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\xUnitRevitUtils2021\xUnitRevitUtils2021.csproj">
-      <Project>{977e0b63-5706-4c2b-9c01-3c02d9ebe377}</Project>
-      <Name>xUnitRevitUtils2021</Name>
-    </ProjectReference>
-  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
diff --git a/SampleLibrary/packages.config b/SampleLibrary/packages.config
index 8a38c3a..566b580 100644
--- a/SampleLibrary/packages.config
+++ b/SampleLibrary/packages.config
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="ModPlus.Revit.API.2021" version="1.0.0" targetFramework="net472" />
+  <package id="ModPlus.Revit.API.2021" version="3.0.0" targetFramework="net48" />
   <package id="xunit" version="2.4.1" targetFramework="net472" />
   <package id="xunit.abstractions" version="2.0.3" targetFramework="net472" />
   <package id="xunit.analyzers" version="0.10.0" targetFramework="net472" />
@@ -8,5 +8,5 @@
   <package id="xunit.core" version="2.4.1" targetFramework="net472" />
   <package id="xunit.extensibility.core" version="2.4.1" targetFramework="net472" />
   <package id="xunit.extensibility.execution" version="2.4.1" targetFramework="net472" />
-  <package id="xUnitRevitUtils.2021" version="1.0.1" targetFramework="net472" />
+  <package id="xUnitRevitUtils.2021" version="1.0.4" targetFramework="net48" />
 </packages>
\ No newline at end of file
diff --git a/config.json b/config.json
new file mode 100644
index 0000000..045efa0
--- /dev/null
+++ b/config.json
@@ -0,0 +1,4 @@
+{
+  "startupAssemblies": [],
+  "autoStart": false
+}
\ No newline at end of file
diff --git a/xUnitRevit/xUnitRevit.csproj b/xUnitRevit/xUnitRevit.csproj
index da47d28..7f6c80e 100644
--- a/xUnitRevit/xUnitRevit.csproj
+++ b/xUnitRevit/xUnitRevit.csproj
@@ -140,8 +140,9 @@
     <When Condition="'$(Configuration)' == 'Debug2020' Or '$(Configuration)' == 'Release2020'">
       <ItemGroup>
         <PackageReference Include="ModPlus.Revit.API.2020">
-          <Version>1.0.0</Version>
+          <Version>3.0.0</Version>
           <ExcludeAssets>runtime</ExcludeAssets>
+          <IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
         </PackageReference>
       </ItemGroup>
       <ItemGroup>
diff --git a/xUnitRevitUtils2020/xUnitRevitUtils2020.csproj b/xUnitRevitUtils2020/xUnitRevitUtils2020.csproj
index aa9f092..07c825f 100644
--- a/xUnitRevitUtils2020/xUnitRevitUtils2020.csproj
+++ b/xUnitRevitUtils2020/xUnitRevitUtils2020.csproj
@@ -24,7 +24,7 @@
   </ItemGroup>

   <ItemGroup>
-    <PackageReference Include="ModPlus.Revit.API.2020" Version="1.0.0" />
+    <PackageReference Include="ModPlus.Revit.API.2020" Version="3.0.0" />
     <PackageReference Include="xunit" Version="2.4.1" />
   </ItemGroup>

diff --git a/xUnitRevitUtils2021/xUnitRevitUtils2021.csproj b/xUnitRevitUtils2021/xUnitRevitUtils2021.csproj
index 76ebef6..2e81c19 100644
--- a/xUnitRevitUtils2021/xUnitRevitUtils2021.csproj
+++ b/xUnitRevitUtils2021/xUnitRevitUtils2021.csproj
@@ -20,7 +20,7 @@
   </PropertyGroup>

   <ItemGroup>
-    <PackageReference Include="ModPlus.Revit.API.2021" Version="1.0.0" />
+    <PackageReference Include="ModPlus.Revit.API.2021" Version="3.0.0" />
     <PackageReference Include="xunit" Version="2.4.1" />
   </ItemGroup>

-- 
2.32.0.windows.2
teocomi commented 2 years ago

Thanks! CLosing this then :)