# dokumentasi Django 2.2.9.dev20191202104323

# Percobaan di Django

Automated testing is an extremely useful bug-killing tool for the modern Web developer. You can use a collection of tests -- a test suite -- to solve, or avoid, a number of problems:

- Ketika anda sedang menulis kode baru, anda dapat menggunakan percobaan untuk memeriksa kode anda bekerja sesuai harapan.
- When you're refactoring or modifying old code, you can use tests to ensure your changes haven't affected your application's behavior unexpectedly.

Testing a Web application is a complex task, because a Web application is made of several layers of logic -- from HTTP-level request handling, to form validation and processing, to template rendering. With Django's test-execution framework and assorted utilities, you can simulate requests, insert test data, inspect your application's output and generally verify your code is doing what it should be doing.

Bagian terbaiknya adalah, dia sangat mudah.

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 Menulis dan menjalankan percobaan document.

You can also use any other Python test framework; Django provides an API and tools for that kind of integration. They are described in the Menggunakan kerangka percobaan berbeda section of Advanced testing topics.

- Menulis dan menjalankan percobaan
- Alat percobaan
- Advanced testing topics