I really love testing and building unit tests, but I find it quite annoying having to build tests for a website's workflow.
e.g.
Register -> Check email -> Activate account -> Login
or
Login -> Edit details -> Submit and view profile
manual testing = loads of time + tireing
even when using app such as Selenium, going though each iteration and then having to check emails etc...
Is there some way of performing an array of tests in a more efficient way?
How do you guys do it? :)
The preferred way to write tests in Django is using the unittest module built-in to the Python standard library. This is covered in detail in the Writing and running tests document. You can also use any other Python test framework; Django provides an API and tools for that kind of integration.
Django provides a test framework with a small hierarchy of classes that build on the Python standard unittest library. Despite the name, this test framework is suitable for both unit and integration tests. The Django framework adds API methods and tools to help test web and Django-specific behavior.
Writing tests Django's unit tests use a Python standard library module: unittest . This module defines tests using a class-based approach. When you run your tests, the default behavior of the test utility is to find all the test cases (that is, subclasses of unittest.
django-nose provides all the goodness of nose in your Django tests, like: Testing just your apps by default, not all the standard ones that happen to be in INSTALLED_APPS. Running the tests in one or more specific modules (or apps, or classes, or folders, or just running a specific test)
I write "functional unit" tests for individual views using Django's test framework. I have found that integration tests are best done using something like Robot Framework. In one of my projects I came up with a minimal, custom implementation of Ward Cunningham's FIT mechanism.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With