Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xm-uitest-sow
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiamai-test
xm-uitest-sow
Commits
4cff5de1
Commit
4cff5de1
authored
Jul 15, 2021
by
linguangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review
parent
5f70970d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
25 deletions
+22
-25
.idea/workspace.xml
+15
-7
src/framework/dingTalk.py
+6
-1
src/testcase/test_LivePage.py
+0
-16
src/testcase/test_WhiteBoardPage.py
+1
-1
No files found.
.idea/workspace.xml
View file @
4cff5de1
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
<option
name=
"autoReloadType"
value=
"SELECTIVE"
/>
<option
name=
"autoReloadType"
value=
"SELECTIVE"
/>
</component>
</component>
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"00f4febb-36b6-426d-bfe6-b023876a617e"
name=
"Default Changelist"
comment=
"
增加白板的测试用例-7个
"
>
<list
default=
"true"
id=
"00f4febb-36b6-426d-bfe6-b023876a617e"
name=
"Default Changelist"
comment=
"
发送钉钉测试报告,本机作为服务器
"
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/
main.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/main
.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/
src/framework/dingTalk.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/framework/dingTalk
.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/
pageobject/whiteboardpage.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/pageobject/whiteboardp
age.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/
testcase/test_LivePage.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/testcase/test_LiveP
age.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/testcase/test_WhiteBoardPage.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/testcase/test_WhiteBoardPage.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/testcase/test_WhiteBoardPage.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/testcase/test_WhiteBoardPage.py"
afterDir=
"false"
/>
</list>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
@@ -166,7 +166,7 @@
...
@@ -166,7 +166,7 @@
<recent
name=
"C:\Users\Administrator\PycharmProjects\xm-uitest-live"
/>
<recent
name=
"C:\Users\Administrator\PycharmProjects\xm-uitest-live"
/>
</key>
</key>
</component>
</component>
<component
name=
"RunManager"
selected=
"Python.
main
"
>
<component
name=
"RunManager"
selected=
"Python.
demo
"
>
<configuration
name=
"demo"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<configuration
name=
"demo"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<module
name=
"xm-uitest-live"
/>
<module
name=
"xm-uitest-live"
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
...
@@ -264,9 +264,9 @@
...
@@ -264,9 +264,9 @@
</configuration>
</configuration>
<recent_temporary>
<recent_temporary>
<list>
<list>
<item
itemvalue=
"Python.demo"
/>
<item
itemvalue=
"Python.main"
/>
<item
itemvalue=
"Python.main"
/>
<item
itemvalue=
"Python.dingTalk"
/>
<item
itemvalue=
"Python.dingTalk"
/>
<item
itemvalue=
"Python.demo"
/>
<item
itemvalue=
"Python tests.pytest for test_WhiteBoardPage.TestLivePage"
/>
<item
itemvalue=
"Python tests.pytest for test_WhiteBoardPage.TestLivePage"
/>
<item
itemvalue=
"Python tests.pytest for test_WhiteBoardPage.TestLivePage.testAddAndOpenWhiteBoard"
/>
<item
itemvalue=
"Python tests.pytest for test_WhiteBoardPage.TestLivePage.testAddAndOpenWhiteBoard"
/>
</list>
</list>
...
@@ -494,7 +494,14 @@
...
@@ -494,7 +494,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1625735563148
</updated>
<updated>
1625735563148
</updated>
</task>
</task>
<option
name=
"localTasksCounter"
value=
"30"
/>
<task
id=
"LOCAL-00030"
summary=
"发送钉钉测试报告,本机作为服务器"
>
<created>
1625802042770
</created>
<option
name=
"number"
value=
"00030"
/>
<option
name=
"presentableId"
value=
"LOCAL-00030"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1625802042770
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"31"
/>
<servers
/>
<servers
/>
</component>
</component>
<component
name=
"TestHistory"
>
<component
name=
"TestHistory"
>
...
@@ -612,7 +619,8 @@
...
@@ -612,7 +619,8 @@
<MESSAGE
value=
"请求头添加enterpriseId,并且设置各个请求头参数为变量,在config.ini中设置"
/>
<MESSAGE
value=
"请求头添加enterpriseId,并且设置各个请求头参数为变量,在config.ini中设置"
/>
<MESSAGE
value=
"review"
/>
<MESSAGE
value=
"review"
/>
<MESSAGE
value=
"增加白板的测试用例-7个"
/>
<MESSAGE
value=
"增加白板的测试用例-7个"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"增加白板的测试用例-7个"
/>
<MESSAGE
value=
"发送钉钉测试报告,本机作为服务器"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"发送钉钉测试报告,本机作为服务器"
/>
</component>
</component>
<component
name=
"editorHistoryManager"
>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/server.log"
/>
<entry
file=
"file://$PROJECT_DIR$/server.log"
/>
...
...
src/framework/dingTalk.py
View file @
4cff5de1
import
time
import
time
import
requests
import
requests
import
json
import
json
import
socket
hostname
=
socket
.
gethostname
()
ip
=
socket
.
gethostbyname
(
hostname
)
def
alert
():
def
alert
():
...
@@ -13,7 +18,7 @@ def alert():
...
@@ -13,7 +18,7 @@ def alert():
"msgtype"
:
"markdown"
,
# 发送类型:text/markdown
"msgtype"
:
"markdown"
,
# 发送类型:text/markdown
"markdown"
:
{
"markdown"
:
{
"title"
:
"uitest报告"
,
# 需要和机器人设置的关键字相对于 否则不会推送到消息
"title"
:
"uitest报告"
,
# 需要和机器人设置的关键字相对于 否则不会推送到消息
"text"
:
"### 代码质量检测报告
\n\n
**项目名称:**测试markdown样式项目
\n\n
**项目地址:**[点击跳转详情](http://
10.0.1.109:63342/index.html)
\n\n
**检测分支:** master
\n\n
**bug数量:**3
\n\n
**相关人员:**@测试
\n\n
**播报时间:**
%
s"
%
tile
,
"text"
:
"### 代码质量检测报告
\n\n
**项目名称:**测试markdown样式项目
\n\n
**项目地址:**[点击跳转详情](http://
{}:63342/index.html)
\n\n
**检测分支:** master
\n\n
**bug数量:**3
\n\n
**相关人员:**@测试
\n\n
**播报时间:** {}"
.
format
(
ip
,
tile
)
,
"at"
:
{
"at"
:
{
"atMobiles"
:
[
"atMobiles"
:
[
""
# 如果需要@某人,这里写他的手机号 这块暂时没有触发 还在研究
""
# 如果需要@某人,这里写他的手机号 这块暂时没有触发 还在研究
...
...
src/testcase/test_LivePage.py
View file @
4cff5de1
...
@@ -50,22 +50,6 @@ class TestLivePage(object):
...
@@ -50,22 +50,6 @@ class TestLivePage(object):
assert
10
<
result
assert
10
<
result
self
.
live_page
.
sleep
(
3
)
self
.
live_page
.
sleep
(
3
)
@allure.title
(
"测试添加白板并打开"
)
def
testWhiteBoard
(
self
):
self
.
live_page
.
click_white_board
()
self
.
live_page
.
sleep
(
2
)
self
.
live_page
.
click_add_white_board
()
self
.
live_page
.
click_camera_btn
()
self
.
live_page
.
sleep
(
1
)
before_whiteboard_savescreen
=
screenshot_path
(
sys
.
_getframe
()
.
f_code
.
co_name
)
+
"/"
+
year_to_minute
()
+
'.png'
self
.
live_page
.
save_screenshot
(
before_whiteboard_savescreen
)
self
.
live_page
.
click_open_white_board
()
self
.
live_page
.
sleep
(
1
)
after_whiteboard_savescreen
=
screenshot_path
(
sys
.
_getframe
()
.
f_code
.
co_name
)
+
"/"
+
year_to_minute
()
+
'.png'
self
.
live_page
.
save_screenshot
(
after_whiteboard_savescreen
)
whiteboard_result
=
compare_pictures
(
before_whiteboard_savescreen
,
after_whiteboard_savescreen
)
assert
10
<
whiteboard_result
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
pytest
.
main
([
"-v"
])
pytest
.
main
([
"-v"
])
src/testcase/test_WhiteBoardPage.py
View file @
4cff5de1
...
@@ -175,7 +175,7 @@ class TestLivePage(object):
...
@@ -175,7 +175,7 @@ class TestLivePage(object):
self
.
White_Board_page
.
save_screenshot
(
before_drap_xiangpica
)
self
.
White_Board_page
.
save_screenshot
(
before_drap_xiangpica
)
get_allure_screenshots
(
before_drap_xiangpica
,
"点击橡皮擦前截图"
)
get_allure_screenshots
(
before_drap_xiangpica
,
"点击橡皮擦前截图"
)
self
.
White_Board_page
.
sleep
(
1
)
self
.
White_Board_page
.
sleep
(
1
)
self
.
White_Board_page
.
drag_mouse
(
self
.
White_Board_page
.
wenben_location_ele
(),
200
,
2
00
)
self
.
White_Board_page
.
drag_mouse
(
self
.
White_Board_page
.
wenben_location_ele
(),
400
,
4
00
)
self
.
White_Board_page
.
sleep
(
1
)
self
.
White_Board_page
.
sleep
(
1
)
after_drap_xiangpica
=
screenshot_path
(
sys
.
_getframe
()
.
f_code
.
co_name
)
+
"/"
+
year_to_minute
()
+
'.png'
after_drap_xiangpica
=
screenshot_path
(
sys
.
_getframe
()
.
f_code
.
co_name
)
+
"/"
+
year_to_minute
()
+
'.png'
self
.
White_Board_page
.
save_screenshot
(
after_drap_xiangpica
)
self
.
White_Board_page
.
save_screenshot
(
after_drap_xiangpica
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment