-
Notifications
You must be signed in to change notification settings - Fork 3k
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
New functional test additions #10200
Closed
Closed
Conversation
This file contains 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
ran tests on noPowerRequestedWithNoItemsParameterized to get data to write about on our assignment 1 doc.
- Added more comments to parameterized tests testing power requests
pushing the completed verification that SectorCapturedStateTest() confirms we have captured a sector in a game of Mindustry
- One goes down fog of war logic in logic.java - one expands on hitting other method coverage in ItemModule.java (blocKInventories)
added damage building. building damage test now passes :D
ammo is kept track in the tile and not the turret itself. i made a building test object to access the current ammo of the turret and used that to compare to a turret variable named compareTo.
added an assert before loading ammo into turret to show it is created with 0 ammo
im not sure if this is what we need but it improves testing on Block.java
FIXED TYPE IM SORRY RYAN
Found better testability test instead with flow
- Small refactoring - Mostly formatting
Updated some formatting and comments.
Unfortunately, I will have to reject this PR. Some of the tests are questionable, while others don't fit the style guidelines or perform redundant operations. It would take more time to sort this out than to write my own tests. Various issues I found:
|
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.
Adding new test cases aimed at capturing the main campaign game states, increasing testability, test coverage, and for adding tests verifying method execution through the use of mocking. This PR is test suite focused.
Inside
DirectConsumerTests.java
:noPowerRequestedWithNoItemsParameterized()
noPowerRequestedSufficiencyParameterized()
Inside
ApplicationTests.java
Added 5 functional tests to ensure proper game states during campaign game mode
runSectorCaptured()
runBossWave()
wavesActiveStateTest()
waveCountdownStateTest()
gameOverStateTest()
Increased test coverage inside
Logic.java
with a new test case (more line, method and branch coverage)fogOfWarUpdateTest()
Increased test coverage inside
ItemModule.java
with 4 new test cases (increase in method, line and branch coverage)addingEntireTileContentsTile()
itemModuleIDCoal()
itemModuleByItemCoal()
itemStackRemoveAndVerifyCheck()
Increased test coverage inside
Turret.java
with new test casetestAmmoLoadingCap()
Increased test coverage inside
Drill.java
with 3 new test casestestDrillTypes()
testDrillWithWater()
testDrillOres()
Increased test coverage inside
Distribution Package
with 3 new test casestestDistributor()
testUnloader()
testOverflowGate()
Added test case to improve testability with testing of liquid flow. This test also uses 2 new methods inside
Conduit.java
andBuildingComp.java
aimed at our dummy methods. Goal here is to have these methods simplify logic for the purpose of testability in relation to liquid flow systems.liquidJunctionOutputTestability()
Use of mocking to further test
Logic
execution, andTurret
building. NOTE: Kinda worried about the Mockito package inclusion because it may be incompatible. May need clarification here.mockVerifyLogicGameStateReset()
logicMockTest()
mockTurretBuildVerification()
Also addition of more comments to touched methods inside
DirectConsumerTests.java
, andApplicationTests,java
If your pull request is not translation or serverlist-related, read the list of requirements below and check each box: