Commit Graph

1067 Commits

Author SHA1 Message Date
d58d5eebe2 Add basic tests for KPS
Created private mock classes to use them in place of `GameplayClock` and
`DrawableRuleset`.
2022-08-11 00:51:13 +02:00
edb8e5e33e Temporarily emptying TestSceneKeysPerSecondCounter until a good test can be found 2022-08-09 02:43:41 +02:00
0c07df2c26 Remove DT from KPS test 2022-08-05 21:02:37 +02:00
b4e0fa7c53 Rewrite tests for KPS 2022-08-05 15:53:06 +02:00
42d1bdfc95 Move KPS calculation to a standalone class 2022-08-05 04:17:01 +02:00
2df24019fd Merge branch 'master' into kps 2022-07-28 18:38:09 +02:00
079150849a Add some tests 2022-07-28 18:37:50 +02:00
b2e7da5aa0 Add basic Queue based implementation of KPS 2022-07-28 18:37:12 +02:00
45879f7836 Merge pull request #19443 from smoogipoo/fix-intermittent-hud-tests
Fix intermittent HUD tests
2022-07-28 23:20:46 +09:00
a21aee4e9c Reduce calls to LoadTrack by implicitly running on test/dummy classes 2022-07-28 18:11:40 +09:00
1039338d80 Fix intermittent HUD tests 2022-07-28 17:58:07 +09:00
2b9d46d803 Remove unused RulesetStore from BeatmapManager constructor 2022-07-28 16:19:05 +09:00
9088caa377 move LegacyComboCounter to osu.Game.Skinning 2022-07-28 08:36:26 +08:00
7f75184a01 Merge branch 'master' into beatmap-update-test 2022-07-26 17:27:36 +09:00
ef10145d6f Rename MenuCursorContainer and clean up code 2022-07-26 14:11:52 +09:00
e5355f314d Use longer hash string 2022-07-25 15:19:32 +03:00
6a3e8e31de Centralise calls to reset online info of a BeatmapInfo 2022-07-25 19:51:19 +09:00
d04df19c7e Remove APIScore and replace its final usage 2022-07-25 13:13:46 +03:00
fa9daa6899 Fix TestSceneReplayRecorder not using score provided by gameplay state 2022-07-25 05:21:27 +03:00
feef16b09b Add potentially failing test case 2022-07-25 04:18:30 +03:00
acd5254f51 Add test coverage ensuring unique acronyms 2022-07-16 17:19:55 +09:00
68afb65aff Move default state steps to SetUp rather than duplicating per test case 2022-07-15 22:10:21 +03:00
21433d4ecb Add test coverage of saving a failed score 2022-07-15 20:14:58 +09:00
4b96d74b0c Add test coverage of LastPlayed updating 2022-07-13 16:43:43 +09:00
09bfca4e4a Fix build failing on tests 2022-07-11 21:45:39 +03:00
667b1d795d Ensure score has custom ruleset 2022-07-08 19:15:03 +03:00
8c7aabccb0 Fix custom legacy ID in test scene not overriding base value 2022-07-08 19:01:21 +03:00
ac3cdf103a Fix test not failing against master 2022-07-08 19:17:51 +09:00
3c8f06403c Make test work properly 2022-07-08 19:03:26 +09:00
57b2f8189c Add back test workaround for TestScenePlayerScoreSubmission with updated explanation
This reverts commit f88e2aa025.
2022-07-07 17:42:03 +09:00
b663986b9f Add test coverage of locally available without replay button handling 2022-07-07 17:04:04 +09:00
461d133c1f Add test coverage of score importing 2022-07-07 16:43:31 +09:00
f88e2aa025 Remove EF test workaround 2022-07-07 15:02:03 +09:00
b597843579 Mark and document remaining flaky tests 2022-07-01 16:17:40 +09:00
c5d31f50cd Attempt to fix flaky TestSceneAutoplay test 2022-06-30 11:38:51 +09:00
d630b62cfc Merge pull request #18915 from peppy/slider-snaking-test-refactoring
Apply various refactorings to `TestSceneSliderSnaking`
2022-06-28 16:16:35 +09:00
35745c83b7 Replace dodgy SetUpSteps overriding with usage of HasCustomSteps 2022-06-28 15:19:02 +09:00
a2701a3205 Increase leaniences on TestSceneSpectatorPlayback.TestWithSendFailure
Not really sure how to improve this further, but should help with cases
like this:

```csharp
[runtime] 2022-06-28 05:32:06 [verbose]: 💨 Class: TestSceneSpectatorPlayback
[runtime] 2022-06-28 05:32:06 [verbose]: 🔶 Test:  TestWithSendFailure
[runtime] 2022-06-28 05:32:06 [verbose]: 🔸 Step #1 Setup containers
[runtime] 2022-06-28 05:32:06 [verbose]: Received 1 new frames (total 1 of 2)
[runtime] 2022-06-28 05:32:06 [verbose]: 🔸 Step #2 received frames
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 7 of 8)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 13 of 19)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 19 of 29)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 25 of 44)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 31 of 45)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 37 of 59)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 43 of 67)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 49 of 125)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 55 of 126)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 61 of 127)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 67 of 128)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 73 of 129)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 79 of 130)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 85 of 131)
[runtime] 2022-06-28 05:32:06 [verbose]: ✔️ 22 repetitions
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 91 of 132)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 97 of 133)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 103 of 134)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 109 of 135)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 115 of 136)
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 121 of 137)
[runtime] 2022-06-28 05:32:06 [verbose]: 🔸 Step #3 start failing sends
[runtime] 2022-06-28 05:32:06 [verbose]: Received 6 new frames (total 127 of 138)
[runtime] 2022-06-28 05:32:06 [verbose]: 🔸 Step #4 wait for send attempts
[runtime] 2022-06-28 05:32:06 [verbose]: 🔸 Step #5 frames did not increase
[runtime] 2022-06-28 05:32:06 [verbose]: 💥 Failed
[runtime] 2022-06-28 05:32:06 [verbose]:  Currently loading components (0)
[runtime] 2022-06-28 05:32:06 [verbose]: 🧵 Task schedulers
[runtime] 2022-06-28 05:32:06 [verbose]: LoadComponentsAsync (standard) concurrency:4 running:0 pending:0
[runtime] 2022-06-28 05:32:06 [verbose]: LoadComponentsAsync (long load) concurrency:4 running:0 pending:0
[runtime] 2022-06-28 05:32:06 [verbose]: 🎱 Thread pool
[runtime] 2022-06-28 05:32:06 [verbose]: worker:          min 1      max 32,767 available 32,766
[runtime] 2022-06-28 05:32:06 [verbose]: completion:      min 1      max 1,000  available 1,000
[runtime] 2022-06-28 05:32:06 [verbose]: Host execution state changed to Stopping
```

https://teamcity.ppy.sh/buildConfiguration/Osu_Build/811?hideProblemsFromDependencies=false&hideTestsFromDependencies=false&expandBuildTestsSection=true
2022-06-28 14:58:34 +09:00
569fde4b47 Add messages to all InvalidOperationExceptions
Without this, they can be very non-descript and hard to track down
2022-06-28 01:34:25 +09:00
401d9c1bae Fix TestStoryboardSkipOutro occasionally failing due to strict timings 2022-06-27 17:13:46 +09:00
31a447fda0 Update parameter discards 2022-06-24 21:26:19 +09:00
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
0147a8ecee Add test coverage of HUD components still getting updated when hidden 2022-06-14 18:35:49 +09:00
17eaf7bb5c Add failing test coverage showing hit meters don't update when not visible 2022-06-13 16:36:22 +09:00
a8e1c5ba87 Fix remaining cases of incorrect GameplayState construction in tests
Manual attempts to initialise replaced by a new `TestGameplayState`
helper for ease of use.
2022-05-28 15:23:29 +02:00
dcf3d76954 Fix unobserved exceptions due to using unconverted beatmap
`TestSceneBeatmapSkinFallbacks` was locally caching a `GameplayState`
instance to fulfill dependencies of a
`SkinnableTargetComponentsContainer`. However, it was doing so using
`new TestBeatmap()`, which is a raw decoded beatmap that hasn't been
converted to any ruleset yet, which was causing failures in
`BeatmapDifficultyCache.GetTimedDifficultyAttributesAsync()` as that
method is expecting to receive a post-conversion, ready-for-gameplay
beatmap.

Resolve by proxying forward dependency instances from the
already-known-to-be-working `actualComponentsContainer`.
2022-05-28 15:23:29 +02:00
9cfe2cc310 Move TestCustomisableModRuleset out of TestSceneModSettings 2022-05-10 21:43:57 +02:00
0fe121f48a Move and rename settings toolbox group test scene 2022-05-09 13:25:33 +03:00
cbd1169495 Move cache declarations of ISamplePlaybackDisabler to interface 2022-05-08 10:38:58 +02:00
9ae019eb39 Move ISamplePlaybackDisabler to more general namespace 2022-05-08 10:38:58 +02:00