diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..3eef3ee9 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,10 @@ +pipeline { + agent any + stages { + stage('阶段 1-1') { + steps { + sh 'echo hello CODING' + } + } + } +} \ No newline at end of file diff --git a/html_report.py b/html_report.py new file mode 100644 index 00000000..6102285c --- /dev/null +++ b/html_report.py @@ -0,0 +1,43 @@ +# -*- coding:UTF-8 -*- +import unittest +import HTMLReport + + +class TestReport(unittest.TestCase): + def setUp(self): + print("start") + + def tearDown(self): + print("end") + + def test_case01(self): + self.assertEquals("123","123") + + def test_case02(self): + self.assertEquals("123","3") + + def test_case03(self): + self.assertEquals("aaa","aaa") + + @unittest.skip("skip") + def test_case04(self): + self.assertEquals("abc","acb") + + +if __name__ == "__main__": + suite = unittest.TestSuite() + suite.addTest(TestReport("test_case01")) + suite.addTest(TestReport("test_case02")) + suite.addTest(TestReport("test_case03")) + suite.addTest(TestReport("test_case04")) + runner = HTMLReport.TestRunner( + report_file_name='index', + output_path='report', + title='testReport', + description='no', + thread_count=1, + thread_start_wait=3, + sequential_execution=False, + lang='cn' + ) + runner.run(suite) \ No newline at end of file diff --git a/test.txt b/test.txt new file mode 100644 index 00000000..fcfe52a0 --- /dev/null +++ b/test.txt @@ -0,0 +1,2 @@ +a=12 +b=23 diff --git a/test_data.json b/test_data.json new file mode 100644 index 00000000..8d4e0fc6 --- /dev/null +++ b/test_data.json @@ -0,0 +1,4 @@ +{ + "name": "test", + "number": 12 +}