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

Qt interface has no unit tests #10

Closed
aleixpol opened this issue Oct 13, 2015 · 6 comments
Closed

Qt interface has no unit tests #10

aleixpol opened this issue Oct 13, 2015 · 6 comments

Comments

@aleixpol
Copy link
Collaborator

Having some tests for generating and querying the database are needed in order to figure out when we regress.

@ximion
Copy link
Owner

ximion commented Oct 13, 2015

We do have unit-tests for the database and parsing - having more would be much better, of course ;-) (see the tests/ directory)

Only the Qt interface doesn't have tests right now, mainly bacause adding some would mean that compiling the Qt interface independently from the rest of AppStream wouldn't be possible anymore, and that's something svuorela wanted back in the days.
(background is that the tests would need to ensure that a temporary database for testing is generated using the latest AppStream (libappstream) code, and therefore would have to call the recently compiled appstreamcli tool)
Since nobody currently compiles the Qt interface without also having the command-line tools, adding a (test-only) dependency here would be fine with me, but I'd have to ask svuorela first.

@ximion ximion changed the title There's no unit tests! Qt interface has no unit tests Oct 13, 2015
@aleixpol
Copy link
Collaborator Author

So they aren't integrated in cmake? "ctest ." gives nothing.

@ximion
Copy link
Owner

ximion commented Oct 13, 2015

They should be.... I run "make test" frequently without issues... Maybe cmake wants more than just add_test to be called for proper ctest integration?

@aleixpol
Copy link
Collaborator Author

Tests are disabled by default, I didn't realize that. Sorry.

@ximion
Copy link
Owner

ximion commented Oct 13, 2015

Aaah :-)
Well, this is something that should be mentioned on the README ;-)
(Also, I think enabling the tests by default doesn't hurt)

@ximion
Copy link
Owner

ximion commented Oct 14, 2015

We now have a very simple unit-test for Qt - needs to be extended, of course.
I am closing this report, since higher test coverage is a general goal, and the particular issue here has been resolved (tests are now documented, and also enabled by default).

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