简体   繁体   中英

How to create a custom testsuite and run testsuite for a django app using mongodatabase

I have a django app structure

/myapp
/myapp/obj1/..
/myapp/obj1/views.py
/myapp/obj1/forms.py
/myapp/obj2/..
/myapp/obj2/views.py
/myapp/obj2/forms.py
/myapp/tests/..
/myapp/tests/__init__.py
/myapp/tests/obj1.py
/myapp/tests/obj2.py

I can run each test file under tests directory of django app using

python manage.py test myapp.tests.obj1.py 

Can u help me to create a testsuite and run testsuite of all testcases as report file in django?

I am not sure what by: "as report file." The default behavior in Django when you issue python manage.py test is to find all the test cases in your test files and automatically build a test suite out of those test cases, and run them. More info here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM