Test Runner for Java ignores @Order annotations on test classes
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java, typescript, vscode
- Lĩnh vực
- devtools, testing-qa
Hướng nghiên cứu
Bắt đầu với luồng thực thi của chế độ xem VSCode Testing và so sánh với lần chạy kiểm thử Gradle, sử dụng các issue liên quan #1740 và #1756 làm ngữ cảnh. Xác minh xem hành vi của @Order và @EnabledIf ở cấp lớp có được giữ nguyên hay không; được xem là hoàn tất khi các lớp và phương thức có thứ tự được chạy nhất quán, hoặc khi việc ghi đè phiên bản runner được hỗ trợ được ghi lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Symptom: JUnit 5 test classes which reliably run in the correct order with gradlew test run in the wrong order in the VSCode IDE.
System: Windows 10, VSCode 1.96.3, Gradle 8.12, Spring Boot 3.4.1, Java 21.04, JUnit 5.11.4
Use case: In a Spring Boot client-server Gradle project, the integration tests in the client execute against the running server. The server-side database state built up by earlier integration tests is required by the later integration tests and thus the tests must be executed in a specific order. Accordingly, the test classes and methods are annotated with @Order and the configuration property junit.jupiter.testclass.order.default = org.junit.jupiter.api.ClassOrderer$OrderAnnotation is set. Executed under Gradle the test classes and methods all run in the designated order. However, in the VSCode Testing view contributed by this extension, the test classes get executed in the wrong order and some test methods don't run at all because they use the @EnabledIf annotation to check whether requisite client-side state (reflecting server-side state) has been collected by tests that are supposed to have run already but which in fact haven't yet run.
I've scoured the docs, searched the web and asked several AI chatbots about this but haven't found any solutions that work.
Hypothesis: the test runner is embedded in the extension (v. 0.43.0) and is of too early a version to support test class ordering (~JUnit 5.8, I believe).
Is it possible to override the test runner version?
Related issues: https://github.com/microsoft/vscode-java-test/issues/1740, #1756
- Ngôn ngữ chính
- TypeScript
- Star
- 340
- Fork
- 173
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 15
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/vscode-java-test
-
CodeLens missing and individual method execution freezes on @Nested JUnit 6 classes (macOS)Có thể đã có người làm @wenytang-ms đã nhận 4 ngày trước. Đang mởai-triaged bug investigating junit test-discovery test-execution
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
microsoft/vscode-java-test#1897 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] The extension uses raw data.Có thể làm lại được @wenytang-ms đã nhận 88 ngày trước và không có pull request nào đang mở. Đang mởai-triaged bug gradle high-priority test-execution
microsoft/vscode-java-test#1880 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] IllegalAccessException: module java.base does not open java.lang to unnamed moduleCó thể làm lại được @wenytang-ms đã nhận 88 ngày trước và không có pull request nào đang mở. Đang mởai-triaged gradle junit test-execution ux
microsoft/vscode-java-test#1878 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-triaged enhancement junit low-priority test-execution ui
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
microsoft/vscode-java-test#1836 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-triaged enhancement gradle investigating junit low-priority test-reporting
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
microsoft/vscode-java-test#1824 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/vscode-java-test
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
aiko-chan-ai/DiscordBotClient#380 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
vercel/ai-elements#507 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 84/100
anaclumos/qa-interns#148 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày