Python??????????????
???????????? ???????[ 2015/9/15 13:57:15 ] ??????????????? ????
???????????????????Щcase????????ж??????е?case????????д???run.py????????????е???????????????????????????£?
????import unittest
????from test_sort import TestSort
????if __name__=='__main__':
????suite=unittest.TestSuite()
????#suite.addTest(TestSort('test_quick_sort_1')) #????????est_quick_sort_1????case
????#suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestSort)) #??????????????
????suite.addTest(unittest.makeSuite(TestSort)) #???TestSort???е?????case
????runner=unittest.TextTestRunner(verbosity=2) #????2??????????????
????runner.run(suite)
??????????????????????????????????setUp??tearDown(???case??????????)??setUpClass??tearDownClass(???????????????)??????д????????????????????case???????????????????????????case?????????setUpClass?н?????????????tearDownClass??д????????????case?????????????Щ????????????????У??????????setUp??д?Щ??????????????????к???tearDown?????????????????????????????
?????÷?????????test_sort.py??????′????????
import unittest
from sort import Sort
class TestSort(unittest.TestCase):
@classmethod
def setUpClass(cls):
print 'this is setupclass'
def setUp(self):
print 'this is setup'
def test_bubble_sort_1(self):
arr=[]
self.assertEquals([]??Sort.bubble_sort(arr))
def test_quick_sort_4(self):
arr=(15??12??36??22??1??7??18)
self.assertEquals(sorted(arr)??Sort.quick_sort(arr))
def tearDown(self):
print 'this is teardown'
@classmethod
def tearDownClass(cls):
print 'this is teardownclass'
???run.pyЧ?????£?
>>>
this is setupclass
test_bubble_sort_1 (test_sort.TestSort) ... this is setup
this is teardown
ok
test_quick_sort_4 (test_sort.TestSort) ... this is setup
this is teardown
ok
this is teardownclass
----------------------------------------------------------------------
Ran 2 tests in 0.043s
OK
>>>
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
iOS???????mocha??chai??sinon??istanbul???????????????????????????????????????д?????Java????????7??????Android?????????Robolectric3.0????(?)???Kiwi?????????????????????????????????Python?????????????????????????????????????Controller????????д?????????10???????????????????Angular????????????Component??Directive??Pipe ???ServiceAndroid????????????????????????????????--Mockito??????iOS UnitTest???????Vue?????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????