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 source locations for test theories in the Visual Studio test explorer #487

Open
Numpsy opened this issue Mar 7, 2024 · 5 comments
Open

Comments

@Numpsy
Copy link
Contributor

Numpsy commented Mar 7, 2024

Hi,

I've seen similar issues with Ionide in the past, and am not really sure if there is an issue in Expecto itself of in the YoloDev test adaptor, but - in reference to YoloDev/YoloDev.Expecto.TestSdk#107 (comment)

If I have an expecto test project with a theory test, and I run if via the Visual Studio (2022) test explorer, then all the test results are shown but there is no source locaion available:

image

I've tried debugging some of Expectos own tests, and I notice that the getLocation function isn't returning anything for test theories, even though the input appears to have the appropriate information inside it:
image

I haven't gone any further with debugging than that yet - thought I'd enquire and see what the expected situation is first?

@Numpsy Numpsy changed the title No source locations for test theories in the Visual Studio test exploror. No source locations for test theories in the Visual Studio test explorer Mar 7, 2024
@Numpsy
Copy link
Contributor Author

Numpsy commented Mar 7, 2024

As the linked YoloDev issue says, testTasks are also missing source information, but in that case it seems to get to

| Async _ | AsyncFsCheck _ ->
as an Async case and exits without trying to get further information

@farlee2121
Copy link
Collaborator

Hmm. I haven't worked with this part of the code base yet. I don't have any prior knowledge to bring to the table here.

Have you found a particular place where getLocation is falling back to SourceLocation.empty for thestTheory?
That might give some hints about what's going wrong

@Numpsy
Copy link
Contributor Author

Numpsy commented Mar 8, 2024

Looks like it gets to

|> Seq.choose getFirstOrDefaultSequencePoint
and then getFirstOrDefaultSequencePoint doesn't find any results

@farlee2121
Copy link
Collaborator

The where clause is looking for methodName. Is it looking for the right method name?
That could be a good indicator of what threads to pull on

@Numpsy
Copy link
Contributor Author

Numpsy commented Mar 17, 2024

It seems to be looking for 'Invoke':
image

It does get into getFirstOrDefaultSequencePoint, but then there are no sequence points found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants