From b13df92bf7e5894d674fc43e547918e14dcf8a3b Mon Sep 17 00:00:00 2001 From: Hui Lan Date: Wed, 14 Jul 2021 21:22:56 +0800 Subject: [PATCH] (1) test_page_position.py: reduce the number of click_by_random. (2) Jenkinsfile: trigger build after each push. --- Jenkinsfile | 4 ++++ app/test/test_page_position.py | 9 ++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8c6836f..332614b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,10 @@ pipeline { agent any + triggers { + pollSCM('') // Enabling being build on Push + } + stages { stage('MakeDatabasefile') { steps { diff --git a/app/test/test_page_position.py b/app/test/test_page_position.py index faf63b1..0b78124 100644 --- a/app/test/test_page_position.py +++ b/app/test/test_page_position.py @@ -48,15 +48,10 @@ def test_page_position(): driver.find_element_by_xpath('//form[1]/p[3]/input[1]').click() # 找到登录按钮 - # 这里随机测试三个单词,点击不熟悉 + # 这里随机测试一个单词,点击不熟悉 click_by_random('不熟悉') - click_by_random('不熟悉') - click_by_random('不熟悉') - - # 这里随机测试三个单词,点击熟悉 - click_by_random('熟悉') - click_by_random('熟悉') + # 这里随机测试一个单词,点击熟悉 click_by_random('熟悉') finally: