Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No test show up after loading a test assembly #33

Open
5 tasks done
andrsbtrg opened this issue Jul 7, 2023 · 4 comments
Open
5 tasks done

No test show up after loading a test assembly #33

andrsbtrg opened this issue Jul 7, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@andrsbtrg
Copy link

Prerequisites

What package are you referring to?

xUnitRevit

Describe the bug

I was hoping that you could help me with this issue:
I cloned and built xUnitRevit the add-in for Revit 2022 I tried to create a sample test assembly to load on the plug in and run.

The bug is: I can load the .dll inside xUniRevit but I see no test cases.

I tried with the SampleLibrary provided in the repo, as well with creating a new project tagetting .NET Framework 4.8 and basically copying one test inside a class.

image

To Reproduce

Launch Revit

(No document is open)

Go to Add-ins tab, launch Test Runner

Assembly -> Open -> Go to \xUnitRevit\SampleLibrary\bin\Debug\SampleLibrary.dll

Expected behavior

Some test cases would show on the window.

Screenshots

System Info

If applicable, please fill in the below details - they help a lot!

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context

Proposed Solution (if any)

Optional: Affected Projects

@andrsbtrg andrsbtrg added the bug Something isn't working label Jul 7, 2023
@PhanCongVuDuc
Copy link

me too, but nobody support it

@teocomi
Copy link
Member

teocomi commented Nov 29, 2023

This usually happens if some unnecessary dlls end up in the library folder (eg the RevitAPI.dll)
@connorivy might have more insights!

@agnBIM
Copy link

agnBIM commented Jan 26, 2024

This could also be due to the newest nuget version of xunit.
I experienced the same behaviour when using the nuget package 2.5.3 of xunit.

There is probably some bug while discovering tests by the xunitRevitRunner with the newer versions.

Switching back to 2.4.2 solves the problem.

@Mehdi-Lucas
Copy link

Mehdi-Lucas commented Feb 22, 2024

Thanks, @agnBIM, for the helpful tip! Upon further investigation, I delved deeper into resolving the compatibility issue with the latest version of xUnit. It turned out that the problem didn't lie in the newest xUnit version itself. Instead, it occur when different versions of xUnit were utilized within both the Addin and the user tests library.

To overcome this, I updated all xUnit package references to the latest version (2.7.0 as of today) in my local repository (all projects/solutions has to be updated!), which I cloned from here. After updating the references, I rebuilt the solutions to ensure the copy of the new Addin files.

image

Since implementing these changes, everything has been functioning seamlessly. The addin now successfully discovers and displays custom tests libraries referencing xUnit 2.7.0

image

Additionally, I've forked the repository and made the necessary updates to xUnit 2.7.0. Anyone can feel free to clone it and build your addin with if you don't want to do the change yourself : https://github.com/Mehdi-Lucas/xUnitRevit
For the rest just follow the same instructions as usual.

I'm relatively new to using this tool, and it's possible that the Speckle team hasn't upgraded to a newer version for a specific reason, possibly due to a bug unknow to me so proceed with caution. I just hope this tool is still supported, it seems pretty usefull.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants