วันพฤหัสบดีที่ 29 มกราคม พ.ศ. 2558

Chapter 4 : What Are We Doing with All These Tests?

from Chapter 3 :

Using Selenium to Test User Interactions

tests[RUN SERVER FIRST]


output result

Open up functional_tests.py Change to same like this :


Run tests again :

Output Result

TIME TO GIT


Next , create template , run this command first

then Create directory in lists/templates/home.html and create home.html at lists/templates/home.html and in home.html has code

and change code in lists/views.py in same like this


RUN TESTS AGAIN

output result

" Django can't find the template "

and then fix INSTALLED_APPS area in superlists/settings.py and change to same like this


RUN TESTS AGAIN

output result

" self.assertTrue(response.content.endswith(b'</html>'))
AssertionError: False is not true "


Let's fix that [get pass] in lists/tests.py in method test_home_page_returns_correct_html

now RUN TESTS AGAIN

output result
OK !!

TIME TO GIT


A little more in lists/templates/home.html. change code to same like this :


Run functional_tests.py again :

output result
then Add method in functional_tests.py

run the FT again : output result

NOW TIME TO GIT


----------------------------
ABOUT TDD PROCESS?
pic credit

And about TDD process with functional and unit tests
pic credit

END Chapter 4





ไม่มีความคิดเห็น:

แสดงความคิดเห็น