Skip to content

How to properly write "unit" tests for analyzers? #7441

Answered by dragonmacher
fmagin asked this question in Q&A
Discussion options

You must be logged in to vote

Oof.

I have very strong opinions on this subject. Rather than waste time expressing those fully here, I will try to give concise answers and only hint at my disdain.

We have never established a good framework for testing analyzers. All previous tests that I have seen have been 'tripwire' tests that check results in a course grained fashion, such as 'assert that there are 5215 symbols' after the test runs. I'm sure you can imagine the uselessness of such a test.

All analyzer tests that I have seen have been full integration tests that use the GUI environment.

The AbstractGhidraHeadlessIntegrationTest sounds like it would do this, but it also inherits from AbstractGuiTest which is specific…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@fmagin
Comment options

@fmagin
Comment options

@fmagin
Comment options

Answer selected by fmagin
Comment options

You must be logged in to vote
1 reply
@fmagin
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants