Feature/api test runner#31
Open
junaeid13 wants to merge 5 commits into
Open
Conversation
AkashBhuiyan
requested changes
Jan 11, 2026
Owner
AkashBhuiyan
left a comment
There was a problem hiding this comment.
Thank you for your contribution! However, this PR doesn't align with the project's current needs and structure. Here are the specific issues:
Problems Identified
1. Out of Scope
- This PR adds API testing functionality, but we need unit tests for the service layer
- The tests should focus on service classes like
ApiExecutorServiceImpl,CollectionServiceImpl,RequestServiceImpl, orEnvironmentServiceImpl
2. Wrong Test Type
- These are integration/API tests using MockMvc
- We need unit tests with mocked dependencies (using
@Mockand@InjectMocks) - Reference: See
HistoryServiceImplTest.java(already implemented) for the expected pattern
3. Incorrect Test Target
- Tests are targeting the controller layer (
/api/historyendpoints) - Should be testing service layer methods directly
4. Wrong Service
HistoryServiceImpltests are already completed- Please pick one of the remaining services from issue #13
What's Needed
Please create unit tests following the same structure as HistoryServiceImplTest.java:
@ExtendWith(MockitoExtension.class)
class [YourService]ImplTest {
@Mock
private [YourRepository] repository;
@InjectMocks
private [YourService]Impl service;
@Test
void testMethod_Scenario_ExpectedResult() {
// Test service method directly
}
}Next Steps
- Review
HistoryServiceImplTest.javaas a reference - Choose one of the remaining services:
ApiExecutorServiceImpl,CollectionServiceImpl,RequestServiceImpl, orEnvironmentServiceImpl - Focus on testing service layer methods, not API endpoints
- Mock repository dependencies
- Follow the test coverage requirements listed in issue #13
Would you like guidance on writing unit tests for one of these services? Happy to help! 😊
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.