question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] What level of testing is "conan test" intended to verify?

See original GitHub issue

I am trying to design a library that I wish to create a Conan package from and I’m slightly confused as to what conan test is supposed to verify. Is conan test supposed to run all of my automated tests for the library (like my “GTest” tests that verify the full library functionality)? Or is it simply supposed to verify that the package can be installed correctly and can be consumed by another project and nothing more?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
KerstinKellercommented, Mar 9, 2020

We’ve stumbled upon this too, and think that it would be beneficial if the test_package was part of the actual Conan package.

Running the test_package for each installed package would many times be very overkill, not intended for most of the cases, only for debugging purposes.

It doesn’t need to be run when consuming a package, just when building it (eg --build missing)

I see three main advantages of test_package belonging to the recipe:

  • If you do a --build outdated the test package would not have to be build everytime, because Conan would know if it has changed or not. (Currently it is run always, even if the recipe is not outdated - we have to work around this in our CI)
  • If a consumer builds with --build missing and for whatever reason their package cannot properly be consumed, then the consumer would get an error when building their dependency, instead of when building their application.
  • Even more importantly, a package where test_package has failed can be uploaded to CI! it’s in the cache, laying there, and Conan upload will pick it up.

From my point it would be great if test_package where part of the conan package!

2reactions
Minimoniumcommented, Mar 8, 2020

I understand where it does run, I’m asking about the problem of it testing only the creator configuration, which is fairly basic considering that we allow changing a package layout basing on literally anything. There is an infinite number of configurations out there that we don’t check. @Morwenn suggested in Slack that it could be beneficial to have test_package be exported with the recipe and check package state for a consumer’s configuration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

conan test — conan 1.44.1 documentation
Tests a package consuming it from a conanfile.py with a test() method. This command installs the conanfile dependencies (including the tested package), calls...
Read more >
exam study guide Flashcards - Quizlet
Study with Quizlet and memorize flashcards containing terms like A bank customer receives an e-mail from a sender claiming to be a bank...
Read more >
Testing levels - GitLab Docs
Unit tests are on the lowest abstraction level and typically test functionality that is not directly perceivable by a user.
Read more >
When Two Possible Fathers are Brothers or Related | DDC
Hi, Carey. In a paternity test, the lab answers a single question: Is the man tested considered the biological father of the child...
Read more >
Persona 5 Royal test answers, including how to ace all exams ...
Much like in real life, Persona 5 Royal tests randomly put you on the spot ... Just like when Morgana helps you with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found