Replies: 1 comment
-
Hi @willhoh, The template has support for gitlab-ci but docker and ci have nothing to do with TDD. Briefly, Test driven development tells you to write your before the implementation. TDD doesn't tell you which environment you have to use (docker) or that you have to run your test each push (ci). I never have used Selenium before but you have to setup your server before Selenium can access it over HTTP. When using docker this can be done with Another option is to use the django test client, as far as I know this behaves quite the same as Selenium. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am currently trying very hard to apply my recently acquired Python knowledge to Django and also to learn the framework and TDD. I came across the book "Test-Driven Development with Python" by Harry J.W. Percival. Unfortunately, the book is relatively old for Django. I also found cookiecutter-django, which is a great basis for real projects.
But now I want to use cookiecutter-django with the docker option, as well as gitlab-ci and TDD.
Has anyone already implemented this? Is there a good and, above all, functioning manual for this?
I have already tried to implement this end-to-end test with selenium-grid as well as selenium-standalone. However, I fail because Pytest can reach the Django LifeSever. WebScraping from other sites with pytest works fine.
I would be super grateful for your help.
P.S.
Just to be clear: I want to use, similar to the regular pytest command (
docker-compose -f local.yml run --rm django pytest
), e.g.docker-compose -f funcTest.yml run --rm django pytest functional_tests
to run a functional test. This would, in my opinion, also facilitate gitlab-ci.Beta Was this translation helpful? Give feedback.
All reactions