Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests #39

Closed
bentsherman opened this issue Apr 4, 2018 · 5 comments
Closed

Unit tests #39

bentsherman opened this issue Apr 4, 2018 · 5 comments

Comments

@bentsherman
Copy link
Member

Need to develop a suite of unit tests as our code begins to solidify. Going to try to document some tests here so that I remember to develop them later:

Data types: test writing to file / reading from file

  • CCMatrix
  • CorrelationMatrix
  • ExpressionMatrix

Algorithms: test with small data (Iris / Yeast), verify results against other libraries (gsl, sklearn)

  • GMM
  • KMeans
  • Pearson
  • Spearman

Analytics: test all applicable capabilities with small data, verify results across capabilities

  • import/export
  • similarity
  • RMT
  • extract
@bentsherman
Copy link
Member Author

All data and analytic objects (except for extract) have basic unit tests. Things that remain:

  • test clustering, correlation algorithms, outlier removal
  • verify output data for all analytic tests
  • test all capabilities (similarity)
  • replace random data with Yeast data where applicable?

@bentsherman bentsherman added this to the 3.3 milestone May 28, 2018
@bentsherman
Copy link
Member Author

I was almost able to upgrade one of my analytic unit tests (ImportExpressionMatrix) to ACE v3, but I can't find a way to run analytics synchronously because QTimer calls don't work in the unit tests.

From some further research, I think the best course will be to follow Qt's suggested paradigm and split each test class into a separate executable and use QTEST_MAIN so that QTimer calls work. The alternative is to manually create a QApplication or QEventLoop but that route isn't immediately obvious to me.

@bentsherman
Copy link
Member Author

Best practices for Qt unit testing: https://wiki.qt.io/Writing_Unit_Tests

@bentsherman bentsherman removed this from the 3.3 milestone Oct 21, 2019
@spficklin
Copy link
Member

@bentsherman is this something being actively worked on or should we close it out to keep issues we don't have time for and want to deal with later out of the queue.

@bentsherman
Copy link
Member Author

This issue is complementary to #96. At some point it would be nice if someone could address the issues I've raised here about the Qt unit tests. But honestly doing #96 would be more useful. So I will follow suit with @spficklin and label this as something for the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants