Skip to content

Automated testing #67

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

Closed
abdulhaq-e opened this issue Aug 23, 2015 · 4 comments
Closed

Automated testing #67

abdulhaq-e opened this issue Aug 23, 2015 · 4 comments

Comments

@abdulhaq-e
Copy link
Contributor

I have made a pull request #66 in which I included automated testing. This will hopefully satisfy the requirement for the v2.0 roadmap #40. A few notes regarding the PR:

1- I have used pytest as the test tool. It's better imo than Django Testing. The original tests have not been touched as py.test is compatible with them. Nonetheless, if you don't like it, automation can be done without it and I can edit the PR (see the examples on the pytest website)

2- pytest is able to generate a runtests script which I did, so python runtests.py would run the tests without the user invoking py.test manually.

3- Tox has been used to test different environments. It's a great tool for such purposes and it goes well with pytest but it's not a necessary. (see docs).

Now this is the worse part:

4- If we're to test a combination of python2.7, python3.2, python3.3, python3.4, django1.6, django1.7, django1.8, drf2.4, drf3.0, drf3.1, drf3.2 Then only a handful of these tests will pass. Anything other than python{27,33,34}, django18, drf{31,32} will FAIL. I had a quick look at the failures, some of them are easy to fix and some are not. However, I didn't fix anything in order to follow a branch per feature process.

Finally, thanks to drf-json-api as I got the idea for automated testing from it. That project is identical to this but this is more mature and active and the code is quite clean (despite the fact that the above tests all work in drf-json-api excluding drf2.4) . Sad fragmentation in OSS.

@abdulhaq-e
Copy link
Contributor Author

I've enabled all the other tests in the second commit.

jerel pushed a commit that referenced this issue Aug 24, 2015
automated testing; django18, drf31 and drf32 only

automated testing for all environments
@jerel
Copy link
Member

jerel commented Aug 24, 2015

Thanks for this @abdulhaq-e! I've merged your code to branch feature/test-all-versions and once all tests are passing on that branch we can merge it to the develop branch. Anybody that contributes to test fixes should preferably open their Pull Request against that branch

jerel pushed a commit that referenced this issue Sep 15, 2015
automated testing; django18, drf31 and drf32 only

automated testing for all environments
@jerel
Copy link
Member

jerel commented Sep 15, 2015

@abdulhaq-e thanks! Your code has been merged to the develop branch. On a different PR I believe you mentioned adding more tests... do you already have some that make use of relationships in pytest/factoryboy fixtures? I'm new to factoryboy so if you already have some tests that could help me get up to speed quickly

@jerel jerel closed this as completed Sep 15, 2015
@abdulhaq-e
Copy link
Contributor Author

@jerel Sorry for the delay, PR #100 has a factory with relationships.

I'm new to pytest/factoryboy as well and I'm still trying to get a hang of it.

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

2 participants