avogadrolibs icon indicating copy to clipboard operation
avogadrolibs copied to clipboard

Write more unit tests & add code coverage tests

Open ghutchis opened this issue 1 year ago • 9 comments

Handling the GUI for testing is tricky, but as seen in #1564 there are issues in the core and io modules that need more unit testing.

Since there are tools to help generate tests for methods, it would be great to expand the unit tests and improve coverage.

I'm marking this as a good first issue, since the test framework is already set up and there are many unit tests already.

ghutchis avatar Jan 03 '24 17:01 ghutchis

If someone has ideas for automating GUI tests with Qt, please add some comments!

ghutchis avatar Jan 03 '24 17:01 ghutchis

We can use Squish

chinmay7016 avatar Jan 04 '24 08:01 chinmay7016

@chinmay7016 - Squish is a commercial product - last I checked it was US$7,000 per year.

ghutchis avatar Jan 05 '24 02:01 ghutchis

What can I refer to understand the testing framework so that I can write more unit test?

ayush2804 avatar Jan 06 '24 04:01 ayush2804

Selenium??

SharanRP avatar Jan 06 '24 15:01 SharanRP

If someone has ideas for automating GUI tests with Qt, please add some comments!

Hi Sir! I researched a bit for some softwares based upon what companies are currently using and cost as well, we can use any one out of Playwright or Katalon Studio. As both are open are source but as it is testing at an advanced level we might have to purchase for some addition features. Both are really good and well-known but KATALON IS CHEAPER, so i would suggest using that more. But i suggested Playwright as well because it sometimes depends which testing software is more compatible with our device which reduces hassle after implementation. So, i gave an alternative for Katalon Studios as well.

Himanshuu23 avatar Feb 11 '24 15:02 Himanshuu23

We're not going to rely on a commercial product for testing. It needs to be deployable at scale.

ghutchis avatar Feb 11 '24 18:02 ghutchis

We're not going to rely on a commercial product for testing. It needs to be deployable at scale.

Expanding unit test coverage is crucial, and I'm considering tackling this task once the blur feature is added. Are there any plans to incorporate visual testing in the future?

perminder-17 avatar Feb 29 '24 00:02 perminder-17

We actually already have several visual tests through ctest. There's an old blog about it here: https://www.kitware.com/using-vtks-image-regression-tests-in-avogadro-2/

ghutchis avatar Feb 29 '24 23:02 ghutchis