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

Functional/Unit/Integration Tests? #84

Open
westurner opened this issue Jul 11, 2020 · 10 comments
Open

Functional/Unit/Integration Tests? #84

westurner opened this issue Jul 11, 2020 · 10 comments

Comments

@westurner
Copy link

Are there tests for this software?

Is there a Software QA / Testing plan / recommended toolset for sugar or specifically for pippy?

I see: https://wiki.sugarlabs.org/go/Category:Testing

From https://bugzilla.redhat.com/show_bug.cgi?id=1855939#c1 ::

A test suite for this package (to be run post-packaging) would reduce the likelihood of these sorts of errors.

@quozl
Copy link
Contributor

quozl commented Jul 11, 2020

Not that I'm aware of. Testing is mostly by hand and without automation.

@pmccabe5
Copy link

pmccabe5 commented Feb 9, 2021

Does the testing automation still need to be added for this project?

@quozl
Copy link
Contributor

quozl commented Feb 9, 2021

I don't think it is needed, but if you want to do it and are willing to keep it running forever, go right ahead. It's a big investment in personal time, and at the rate of change for Pippy (see commits) it hardly seems justified. A step by step guide for human testing might be a better investment. We have a guide now.

@westurner
Copy link
Author

westurner commented Feb 9, 2021

It's extremely unlikely that an investment of time into automated testing would be a waste relative to other development activities.

Testing [GUI] apps manually is a huge time suck; and humans skip steps and find bugs not yet present in the test.

Maybe start with coverage on the main() function? pytest-cov is one way to check test coverage: what percentage of source code lines and or expressions are executed by at least one test function:

pytest --cov=mypkg --cov-report=term-missing tests/

https://pypi.org/project/pytest-cov/

Is there a specific pytest plugin (e.g. pytest-qt) that the sugarlabs projects prefer to use for testing GUI apps in sugar; because quality assurance?

Manual testing is very slow, expensive, and error prone. For one, automated testing makes it possible to change without breaking other people's code: if it's going to be days or weeks to get a PR merged due to waiting for manual testing to occur, people don't consider contributing.

@pmccabe5
Copy link

pmccabe5 commented Feb 9, 2021

My idea wasn't to develop the automated testing for just Pippy but rather a general framework from a project that I have worked on for the calculate activity and modify it so it can test different activities for the entire project (since this was one of the first projects that called for a need for automated testing).

@westurner
Copy link
Author

Minimally, what does a GUI testing framework have?

@sparshg
Copy link
Member

sparshg commented Jul 4, 2023

I don't think a testing framework would be required. As @quozl mentioned, last commit was made 3 years ago, the frequency of commits is way too little to justify the efforts needed to build a whole testing framework for Pippy.
I agree this could be helpful if built to integrate with any sugar activity, even though I don't think many activities have that active commit history, but then this issue shouldn't belong here. What do you think @chimosky

@westurner
Copy link
Author

westurner commented Jul 4, 2023 via email

@westurner
Copy link
Author

westurner commented Jul 4, 2023 via email

@chimosky
Copy link
Member

chimosky commented Jul 5, 2023

I think testing would be of great help but right now except someone wants to take it on the themselves to write tests for this activity first before looking at the broader sugar activities then I'll gladly review it.

@westurner it'll be of great help if you have something you'd like to share.

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

No branches or pull requests

5 participants