Software testing project
April 2019 Update: These are files related to an old project in software testing. It is no longer maintained.
Files for Software Testing Project 2017, Uppsala University
The files bs_test.py and bs_func.py are now legacy. You can open them if you want, but no code from these files are run during the tests. bs_test.py contains calls to some constructors defined in the elements.py module, and some calls to internal functions.
The file plan_for_test.txt contains a list of functionality planned for testing.
##To add tests, do the following:
-
Add a HTML file to the html_testfile folder or write one directly in the initialization code for the test class in unittest_tests.py
-
Turn it into soup by calling the BS constructor.
-
Add tests.
Check the unittest_tests.py to see examples.
##To run the tests on the BS project, do the following:
-
Download the BS project (clone it with git, this is probably easiest).
-
Copy the file "unittest_test.py" to the BS root directory.
-
Copy the folder "html_testfiles" to the BS root directory
-
Open your terminal.
To just run the tests, run: python unittest_tests.py
To have Coverage produce a report, run: coverage run unittest_tests.py
To have Coverage print out a nice html-report, run: coverage html