Skip to content

Add integration tests#120

Merged
Lexer747 merged 3 commits into
ngraves95:mainfrom
Lexer747:pr-integration-tests
Mar 19, 2026
Merged

Add integration tests#120
Lexer747 merged 3 commits into
ngraves95:mainfrom
Lexer747:pr-integration-tests

Conversation

@Lexer747

@Lexer747 Lexer747 commented Mar 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR chips away at #115 I was heavily inspired by the testing done in the mainline runelite plugins, e.g.

The actual "unit test" part of this is that we now have src\test\java\com\attacktimer\IntegrationTests.java which creates mock objects (using Mockito, same version as runelite) to stub out the client and other APIs which the plugin expects. Then we create a scenario using these mocks to imitate how I expect the sequence of events to occur when the plugin needs to trigger. Then we mock the game ticks while asserting the plugins internal state is expected.

The integration test part is more of baselining approach than an actual integration test, but it's a start.

Ideally I find some time to add a test case for each of the variable speed plugins, especially TDs as from my own slayer tasks that code is a bit brittle at times 😅

add full state tracking

Add eating food test
@Lexer747
Lexer747 force-pushed the pr-integration-tests branch from e385e95 to e875c1d Compare March 17, 2026 22:31
@Lexer747 Lexer747 changed the title Add integration test Add integration tests Mar 17, 2026
@Lexer747
Lexer747 marked this pull request as ready for review March 17, 2026 23:11
@Lexer747
Lexer747 requested a review from ngraves95 March 17, 2026 23:11
@Lexer747
Lexer747 merged commit 610782e into ngraves95:main Mar 19, 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