Skip to content

Commit 8452fe7

Browse files
committed
Update: update documentation of running tests
1 parent aacc3a8 commit 8452fe7

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

content/guides/dotnet/run-tests.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,20 @@ The following is the updated Dockerfile.
5050
```dockerfile {hl_lines="9"}
5151
# syntax=docker/dockerfile:1
5252

53-
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
53+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
5454
ARG TARGETARCH
5555
COPY . /source
5656
WORKDIR /source/src
5757
RUN --mount=type=cache,id=nuget,target=/root/.nuget/packages \
5858
dotnet publish -a ${TARGETARCH/amd64/x64} --use-current-runtime --self-contained false -o /app
5959
RUN dotnet test /source/tests
6060

61-
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS development
61+
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS development
6262
COPY . /source
6363
WORKDIR /source/src
6464
CMD dotnet run --no-launch-profile
6565

66-
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS final
66+
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS final
6767
WORKDIR /app
6868
COPY --from=build /app .
6969
ARG UID=10001
@@ -92,16 +92,14 @@ You should see output containing the following.
9292
#11 1.564 Determining projects to restore...
9393
#11 3.421 Restored /source/src/myWebApp.csproj (in 1.02 sec).
9494
#11 19.42 Restored /source/tests/tests.csproj (in 17.05 sec).
95-
#11 27.91 myWebApp -> /source/src/bin/Debug/net8.0/myWebApp.dll
96-
#11 28.47 tests -> /source/tests/bin/Debug/net8.0/tests.dll
97-
#11 28.49 Test run for /source/tests/bin/Debug/net8.0/tests.dll (.NETCoreApp,Version=v8.0)
98-
#11 28.67 Microsoft (R) Test Execution Command Line Tool Version 17.3.3 (x64)
99-
#11 28.67 Copyright (c) Microsoft Corporation. All rights reserved.
95+
#11 27.91 myWebApp -> /source/src/bin/Debug/net10.0/myWebApp.dll
96+
#11 28.47 tests -> /source/tests/bin/Debug/net10.0/tests.dll
97+
#11 28.49 Test run for /source/tests/bin/Debug/net10.0/tests.dll (.NETCoreApp,Version=v10.0)
10098
#11 28.68
10199
#11 28.97 Starting test execution, please wait...
102100
#11 29.03 A total of 1 test files matched the specified pattern.
103101
#11 32.07
104-
#11 32.08 Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: < 1 ms - /source/tests/bin/Debug/net8.0/tests.dll (net8.0)
102+
#11 32.08 Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: < 1 ms - /source/tests/bin/Debug/net8.0/tests.dll (net10.0)
105103
#11 DONE 32.2s
106104
```
107105

0 commit comments

Comments
 (0)