Skip to content

fix(test): add missing @Test annotations and fix JUnit 5 lifecycle methods#38

Merged
marevol merged 1 commit intomainfrom
fix/junit5-test-annotations
Jan 14, 2026
Merged

fix(test): add missing @Test annotations and fix JUnit 5 lifecycle methods#38
marevol merged 1 commit intomainfrom
fix/junit5-test-annotations

Conversation

@marevol
Copy link
Copy Markdown
Contributor

@marevol marevol commented Jan 14, 2026

Summary

This PR fixes issues with JUnit 5 test execution by adding missing @Test annotations and correcting lifecycle method patterns across all test files.

Changes Made

  • Added missing @Test annotations: All test methods now have proper JUnit 5 @Test annotations to ensure they are discovered and executed by the test runner
  • Fixed lifecycle method patterns: Converted @BeforeEach/@AfterEach annotations to @Override methods for setUp/tearDown to properly extend the PlainTestCase base class
  • Fixed type mismatches: Updated assertEquals calls comparing long values to use L suffix (e.g., assertEquals(1051L, responseData.getContentLength()))
  • Applied code formatter: Ran mvn formatter:format to ensure consistent code style

Files Modified

  • PlaywrightAuthTest.java
  • PlaywrightClientConcurrencyTest.java
  • PlaywrightClientConfigTest.java
  • PlaywrightClientCreatorTest.java
  • PlaywrightClientDataTest.java
  • PlaywrightClientEdgeCaseTest.java
  • PlaywrightClientExceptionTest.java
  • PlaywrightClientHc5MigrationTest.java
  • PlaywrightClientInternalMethodTest.java
  • PlaywrightClientPropertyTest.java
  • PlaywrightClientProxyTest.java
  • PlaywrightClientSslIgnoreTest.java
  • PlaywrightClientTest.java
  • CrawlerWebProxyTest.java

Testing

  • All tests pass with mvn test
  • Verified test methods are properly discovered by JUnit 5

🤖 Generated with Claude Code

…thods

- Add missing @test annotations to all test methods across 14 test files
- Convert @BeforeEach/@AfterEach to @OverRide methods for setUp/tearDown
  to properly extend PlainTestCase base class
- Fix assertEquals calls for long comparisons by adding L suffix
- Apply code formatter for consistent formatting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@marevol marevol requested a review from Copilot January 14, 2026 14:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses critical test execution issues by adding missing @Test annotations and fixing JUnit 5 lifecycle method implementations across the test suite. Without proper annotations and lifecycle method patterns, test methods would not be discovered or executed by the JUnit 5 test runner.

Changes:

  • Added @Test annotations to all test methods to ensure proper test discovery and execution
  • Converted lifecycle methods from JUnit 5 annotations to @Override methods that properly extend PlainTestCase
  • Fixed type mismatches in assertions by adding L suffix to long literals

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
CrawlerWebProxyTest.java Added @test annotations to 11 test methods for proxy functionality testing
PlaywrightClientTest.java Added @test annotations and fixed lifecycle methods; corrected long literal comparisons
PlaywrightClientSslIgnoreTest.java Added @test annotations and fixed lifecycle methods; corrected long literal comparison
PlaywrightClientProxyTest.java Added @test annotations and fixed lifecycle methods; corrected long literal comparison
PlaywrightClientPropertyTest.java Added @test annotations to 24 property configuration test methods
PlaywrightClientInternalMethodTest.java Added @test annotations and fixed lifecycle methods for 26 internal method tests
PlaywrightClientHc5MigrationTest.java Added @test annotations to 14 HC5 migration compatibility tests
PlaywrightClientExceptionTest.java Added @test annotations to 16 exception handling tests; corrected long literal comparisons
PlaywrightClientEdgeCaseTest.java Added @test annotations to 10 edge case tests; corrected long literal comparisons
PlaywrightClientDataTest.java Added @test annotations to 24 data handling tests; corrected long literal comparisons
PlaywrightClientCreatorTest.java Added @test annotations and fixed lifecycle methods for 7 creator tests
PlaywrightClientConfigTest.java Added @test annotations to 16 configuration tests
PlaywrightClientConcurrencyTest.java Added @test annotations to 9 concurrency tests; reformatted code
PlaywrightAuthTest.java Added @test annotations and fixed lifecycle methods for 3 authentication tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@marevol marevol merged commit 2121b89 into main Jan 14, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants