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

Improve Unit testing #50

Open
6 of 9 tasks
patkan opened this issue Jul 12, 2015 · 4 comments
Open
6 of 9 tasks

Improve Unit testing #50

patkan opened this issue Jul 12, 2015 · 4 comments

Comments

@patkan
Copy link
Member

patkan commented Jul 12, 2015

The project should use unittests. For this a structure should be designed to easily test the whole project.
How should the Unittest-files be namend? Should the classes be in the same file as the program code? How to find all unit-tests in the project?

Not called unittests:

  • FabLabKasse.cashPayment.client.PaymentDevicesManager.PaymentDevicesManager#_canPayout_Unittest
  • FabLabKasse/cashPayment/server/helpers/banknote_stack_helper.py:283
  • FabLabKasse/cashPayment/server/mdbCash/mdb.py:633
  • FabLabKasse.cashPayment.server.NV11.NV11Device.ESSPDevice.Helper#unitTest
  • FabLabKasse.cashPayment.server.NV11.NV11Device.ESSPDevice.ByteStreamReader#unitTest
  • doctest in FabLabKasse/kassenbuch.py:57
  • FabLabKasse/shopping/backend/abstract.py:466
  • evaluate pythoscope
  • move unittests to extra files (tests directory or test_modulename.py in same directory)
@patkan
Copy link
Member Author

patkan commented Jul 13, 2015

Maybe tox is an option.

@mgmax
Copy link
Member

mgmax commented Sep 4, 2015

basic infrastructure is now ready: ./run_unittests.sh
Next step: Find all unittests that are not yet called

@mgmax mgmax removed the question label Sep 4, 2015
@patkan
Copy link
Member Author

patkan commented Sep 5, 2015

Not called unittests --> see list in first post.

patkan added a commit that referenced this issue Sep 5, 2015
 * adds a unittest loader for the existing doctests
 * this might be interesting for a bigger scope
 * relevant to #50
@patkan
Copy link
Member Author

patkan commented Sep 27, 2015

Plus: have a look at pythoscope. This is a tool for automatic test generation. You supply an entry point that starts your application and then run it with pythoscope. It then tries to gather as much data as possible and automatically write unittests. At least, it generates the stubs for unittesting.
For this you would have to write a piece of code that starts the Terminal and then click around in the GUI.

@mgmax mgmax removed the enhancement label Nov 22, 2015
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