Skip to content

Commit 5191cc8

Browse files
committed
add more readme
1 parent bac9719 commit 5191cc8

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ if __name__ == '__main__':
271271
unittest.main()
272272
```
273273

274-
The ```setUpClass()``` is a class method that is called only onces for the whole class before all the tests. The function is useful for set up a *fixture* which can be sample data, preconditions states or context need to run a test. We initialize the RDPHTTPController object (as ```app``` class variable) and the RDP Base URL string (as ```base_URL``` class variable) as our fixture here.
274+
The ```setUpClass()``` is a class method that is called only onces for the whole class before all the tests. The function is useful for set up a *fixture* which can be sample data, preconditions states, context or resources need to run a test. We initialize the RDPHTTPController object (as ```app``` class variable) and the RDP Base URL string (as ```base_URL``` class variable) as our fixture here.
275275

276276
Note: The counterpart method of ```setUpClass()``` method is ```tearDownClass()``` which is called after all tests in the class have run.
277277

@@ -330,7 +330,10 @@ Ran 2 tests in 0.816s
330330
FAILED (errors=1)
331331
```
332332

333-
However, developers need to run test cases every time they make change to a source code. It is a bad idea to make request to the action service.
333+
However, the test suite above make HTTP requests to RDP APIs in every run. It is not a good idea to flood HTTP request messages to RDP APIs as the test suite always run repeatedly every time developers update their code. It is also not advisable to make test cases that rely on external dependencies, APIs, or components because.
334+
335+
It is a bad idea to make the test case depends on external services or components .
336+
334337

335338
## Project Structure
336339

@@ -377,4 +380,7 @@ https://web.archive.org/web/20150315073817/http://www.xprogramming.com/testfram.
377380

378381
https://betterprogramming.pub/13-tips-for-writing-useful-unit-tests-ca20706b5368
379382

380-
https://docs.python-guide.org/writing/tests/
383+
https://docs.python-guide.org/writing/tests/
384+
385+
https://softwareengineering.stackexchange.com/questions/89064/how-and-when-to-use-unit-testing-properly
386+

0 commit comments

Comments
 (0)