Djenesis / contributr

An online tool for programmers to find projects they can contribute to and project maintainers to find contributors.
MIT License
16 stars 16 forks source link

Added functional tests and first FT to check homepage #81

Closed talaniz closed 8 years ago

talaniz commented 8 years ago

This change creates a base.py which contains the Functional Test class. Currently, the class subclasses the LiveServerTestCase class and has setUp and tearDown methods. test_finding_contributr_projects.py is not completely finished, and stops at an intentional failure with a reminder to finish the test. Currently, it only checks for Contributr in the browser title and on the home page. I'll be pushing for more test cases to get ahead of some of the view development and to see if we can create user stories for testing overall functionality during development and for regression testing after new features are introduced.

coolharsh55 commented 8 years ago

@talaniz So why a PR when the functionality isn't finished or when the tests are failing?

talaniz commented 8 years ago

2 reasons:

  1. The test is technically in a passing state, the fail is expected & initiated as a reminder to continue working on the test.
  2. The format is established in case anyone wants to contribute to it. FT's will usually be added to when new functionality is introduced.

On Sep 27, 2015, at 12:17 AM, Harshvardhan Pandit notifications@github.com wrote:

@talaniz https://github.com/talaniz So why a PR when the functionality isn't finished or when the tests are failing?

— Reply to this email directly or view it on GitHub https://github.com/Djenesis/contributr/pull/81#issuecomment-143526354.

coolharsh55 commented 8 years ago

@talaniz why do you want an intentionally failing test to be included that will break the CI builds every time? If the functionality isn't finished, you should create an issue on it, or a branch, if more people are working on it.

talaniz commented 8 years ago

The reason there is an intentional fail is a reminder to complete the functional test. These tests are not meant to be covered by Travis CI and at the moment, they should not be covered in Pytest either. This is for testing that the code meets the expected functionality and that new features don't break any existing features. I've added the @pytest.mark.xfail and I'm checking to make sure this won't break Travis CI before pushing again.

Ideally, we should really kill this pull request.

talaniz commented 8 years ago

Closing this request. Too many issues with functional test against Travis CI. Will send another later.