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

Native AOT stack trace integration test #2772

Open
vaind opened this issue Oct 31, 2023 · 5 comments
Open

Native AOT stack trace integration test #2772

vaind opened this issue Oct 31, 2023 · 5 comments
Labels

Comments

@vaind
Copy link
Collaborator

vaind commented Oct 31, 2023

We can't unit test Native AOT implementation of DebugStackTrace (there's no xUnit runner to support AOT so no way to test this in unit tests. There's a tracking issue: dotnet/runtime#91069). Instead, we need to have an integration test that captures app requests.

Possible solutions

More context: #2732 (comment)

TODO items have been left as markers in DebugStackTraceTests.verify, to indicate the test cases that we should try to cover. For example:

// TODO: Create integration test to test this behaviour when publishing AOT apps
// See https://github.com/getsentry/sentry-dotnet/issues/2772
    [Fact]
    public void CreateSentryStackFrame_AppNamespace_InAppFrame()
    {
        var frame = new StackFrame();
        var sut = _fixture.GetSut();

        var actual = sut.CreateFrame(new RealStackFrame(frame));

        Assert.True(actual?.InApp);
    }
@jamescrosswell
Copy link
Collaborator

@vaind are there any gaps on this issue that I can help with? I see you've already got various integration tests here. I'm not sure if that covers all the scenarios we wanted to cover though... e.g. all the TODO items in DebugStackTraceTests.verify.cs.

I figured integration tests is probably the most important thing still sitting on the backlog besides what you're doing.

@vaind
Copy link
Collaborator Author

vaind commented Nov 7, 2023

I'm not sure if that covers all the scenarios we wanted to cover though... e.g. all the TODO items in DebugStackTraceTests.verify.cs.

It doesn't but that PR will enable us to implement these, once it's merged.

@vaind vaind assigned vaind and unassigned vaind Nov 9, 2023
@vaind
Copy link
Collaborator Author

vaind commented Nov 9, 2023

There are some basic runtime tests for AOT in integration-test/runtime.Tests.ps added by #2781

I've had a look at the places marked with TODO linking this issue & integration testing it would be quite a bit of work so I hope we could wait for dotnet/runtime#91069

@vaind
Copy link
Collaborator Author

vaind commented Nov 22, 2023

For future investigation: I've had an idea to run the MAUI devicetest app with a NativeAOT published build. I can't try it out at the moment because we need to update device-tests to net8 first, which is blocked (#2854).

@ivanpovazan
Copy link

ivanpovazan commented Jan 17, 2024

For future investigation: I've had an idea to run the MAUI devicetest app with a NativeAOT published build. I can't try it out at the moment because we need to update device-tests to net8 first, which is blocked (#2854).

FWIW, we will be standing up MAUI device tests with NativeAOT on iOS, which is being tracked here: dotnet/maui#19817

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Status: No status
Development

No branches or pull requests

4 participants