[Geany-Devel] Helping Geany move forward: testing

Lex Trotman elextr at xxxxx
Sat Apr 29 01:35:46 UTC 2017


...
>>
>> Geany is almost entirely an interactive application, so until
>> interactive tests are possible I don't think technical tests like
>> these will add a great deal to the committability of PRs.
>
>
> If the tests just test functions, all it needs is to get Geany started up,
> then the tests can call the new/changed functions testing with different
> inputs and such. There are at least two PRs to do similar.

Sadly Geany isn't a pure functional program, most functions leave
messy side-effects on global data, the Scintilla buffers :(

So you need to be able to examine those.

>
>> Clangalizers and sanitizers and formatters won't tell you that the PR
>> actually puts 'z' in the buffer instead of 'a'.
>>
>
> No, but they'll catch a number of runtime bugs that are often hard to
> identify upon basic code inspection or manual testing.
>
>> Perhaps Columban knows more about using the accessibility framework
>> for testing now Scintilla supports it?
>>
>
> There are several UI testing frameworks that work with GTK+, though I've not
> used any: autopilot, dogtail, and LDTP.
>
> I don't think we really need fully automatic UI testing (seems like too much
> work), but we could get a long way just testing at the function level,
> ensuring functions uphold their contract and flexing them with unusual
> inputs. Making a testable function usually means writing it better too,
> avoiding global state and writing more "pure" functions, and making
> functions do one thing and not writing huge functions or many small
> functions.

We really NEED automatic UI testing and we NEED function unit testing,
but realistically we are not going to get either.  If we don't have
enough resources to just run and test PRs we don't have the resources
to add these.

Hence my suggestions of purely social engineering in previous posts.

Cheers
Lex

>
>
> Regards,
> Matthew Brush
>
> _______________________________________________
> Devel mailing list
> Devel at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel


More information about the Devel mailing list