Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
zhangjingdong
/
bihe_interface_test
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f58db26b
authored
Jan 14, 2019
by
zhangjingdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试服务器发送邮件1
parent
d558cffc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
.idea/workspace.xml
+12
-12
碧合app/execute_automation_scripts.py
+3
-3
No files found.
.idea/workspace.xml
View file @
f58db26b
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
</component>
</component>
<component
name=
"CoverageDataManager"
>
<component
name=
"CoverageDataManager"
>
<SUITE
FILE_PATH=
"coverage/bihe_interface_test$hebin.coverage"
NAME=
"hebin Coverage Results"
MODIFIED=
"1547019882690"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"coverage.py"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$/碧合app"
/>
<SUITE
FILE_PATH=
"coverage/bihe_interface_test$hebin.coverage"
NAME=
"hebin Coverage Results"
MODIFIED=
"1547019882690"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"coverage.py"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$/碧合app"
/>
<SUITE
FILE_PATH=
"coverage/bihe_interface_test$execute_automation_scripts.coverage"
NAME=
"execute_automation_scripts Coverage Results"
MODIFIED=
"1547434
463013
"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"coverage.py"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$/碧合app"
/>
<SUITE
FILE_PATH=
"coverage/bihe_interface_test$execute_automation_scripts.coverage"
NAME=
"execute_automation_scripts Coverage Results"
MODIFIED=
"1547434
572502
"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"coverage.py"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$/碧合app"
/>
</component>
</component>
<component
name=
"FavoritesManager"
>
<component
name=
"FavoritesManager"
>
<favorites_list
name=
"bihe_interface_test"
/>
<favorites_list
name=
"bihe_interface_test"
/>
...
@@ -23,11 +23,11 @@
...
@@ -23,11 +23,11 @@
<file
leaf-file-name=
"execute_automation_scripts.py"
pinned=
"false"
current-in-tab=
"true"
>
<file
leaf-file-name=
"execute_automation_scripts.py"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/碧合app/execute_automation_scripts.py"
>
<entry
file=
"file://$PROJECT_DIR$/碧合app/execute_automation_scripts.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
-743
"
>
<state
relative-caret-position=
"
237
"
>
<caret
line=
"
14"
column=
"35"
selection-start-line=
"14"
selection-start-column=
"35"
selection-end-line=
"14"
selection-end-column=
"35
"
/>
<caret
line=
"
48"
column=
"41"
selection-start-line=
"48"
selection-start-column=
"41"
selection-end-line=
"48"
selection-end-column=
"41
"
/>
<folding>
<folding>
<element
signature=
"e#19#30#0"
expanded=
"true"
/>
<element
signature=
"e#19#30#0"
expanded=
"true"
/>
<marker
date=
"1547434
480403"
expanded=
"true"
signature=
"2655:3690
"
ph=
"..."
/>
<marker
date=
"1547434
571083"
expanded=
"true"
signature=
"2640:3675
"
ph=
"..."
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
...
@@ -369,7 +369,7 @@
...
@@ -369,7 +369,7 @@
<caret
line=
"10"
column=
"49"
lean-forward=
"true"
selection-start-line=
"10"
selection-start-column=
"49"
selection-end-line=
"10"
selection-end-column=
"49"
/>
<caret
line=
"10"
column=
"49"
lean-forward=
"true"
selection-start-line=
"10"
selection-start-column=
"49"
selection-end-line=
"10"
selection-end-column=
"49"
/>
<folding>
<folding>
<element
signature=
"e#19#30#0"
expanded=
"true"
/>
<element
signature=
"e#19#30#0"
expanded=
"true"
/>
<marker
date=
"1547434
480403"
expanded=
"true"
signature=
"2655:3690
"
ph=
"..."
/>
<marker
date=
"1547434
571083"
expanded=
"true"
signature=
"2640:3675
"
ph=
"..."
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
...
@@ -422,7 +422,7 @@
...
@@ -422,7 +422,7 @@
<caret
line=
"11"
column=
"49"
lean-forward=
"true"
selection-start-line=
"11"
selection-start-column=
"49"
selection-end-line=
"11"
selection-end-column=
"49"
/>
<caret
line=
"11"
column=
"49"
lean-forward=
"true"
selection-start-line=
"11"
selection-start-column=
"49"
selection-end-line=
"11"
selection-end-column=
"49"
/>
<folding>
<folding>
<element
signature=
"e#19#30#0"
expanded=
"true"
/>
<element
signature=
"e#19#30#0"
expanded=
"true"
/>
<marker
date=
"1547434
480403"
expanded=
"true"
signature=
"2655:3690
"
ph=
"..."
/>
<marker
date=
"1547434
571083"
expanded=
"true"
signature=
"2640:3675
"
ph=
"..."
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
...
@@ -439,7 +439,7 @@
...
@@ -439,7 +439,7 @@
<caret
line=
"15"
column=
"32"
lean-forward=
"true"
selection-start-line=
"15"
selection-start-column=
"32"
selection-end-line=
"15"
selection-end-column=
"32"
/>
<caret
line=
"15"
column=
"32"
lean-forward=
"true"
selection-start-line=
"15"
selection-start-column=
"32"
selection-end-line=
"15"
selection-end-column=
"32"
/>
<folding>
<folding>
<element
signature=
"e#19#30#0"
expanded=
"true"
/>
<element
signature=
"e#19#30#0"
expanded=
"true"
/>
<marker
date=
"1547434
480403"
expanded=
"true"
signature=
"2655:3690
"
ph=
"..."
/>
<marker
date=
"1547434
571083"
expanded=
"true"
signature=
"2640:3675
"
ph=
"..."
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
...
@@ -457,7 +457,7 @@
...
@@ -457,7 +457,7 @@
<caret
line=
"14"
column=
"25"
selection-start-line=
"14"
selection-start-column=
"25"
selection-end-line=
"14"
selection-end-column=
"25"
/>
<caret
line=
"14"
column=
"25"
selection-start-line=
"14"
selection-start-column=
"25"
selection-end-line=
"14"
selection-end-column=
"25"
/>
<folding>
<folding>
<element
signature=
"e#19#30#0"
expanded=
"true"
/>
<element
signature=
"e#19#30#0"
expanded=
"true"
/>
<marker
date=
"1547434
480403"
expanded=
"true"
signature=
"2655:3690
"
ph=
"..."
/>
<marker
date=
"1547434
571083"
expanded=
"true"
signature=
"2640:3675
"
ph=
"..."
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
...
@@ -480,7 +480,7 @@
...
@@ -480,7 +480,7 @@
<caret
line=
"8"
column=
"8"
lean-forward=
"true"
selection-start-line=
"8"
selection-start-column=
"8"
selection-end-line=
"8"
selection-end-column=
"8"
/>
<caret
line=
"8"
column=
"8"
lean-forward=
"true"
selection-start-line=
"8"
selection-start-column=
"8"
selection-end-line=
"8"
selection-end-column=
"8"
/>
<folding>
<folding>
<element
signature=
"e#19#30#0"
expanded=
"true"
/>
<element
signature=
"e#19#30#0"
expanded=
"true"
/>
<marker
date=
"1547434
480403"
expanded=
"true"
signature=
"2655:3690
"
ph=
"..."
/>
<marker
date=
"1547434
571083"
expanded=
"true"
signature=
"2640:3675
"
ph=
"..."
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
...
@@ -589,11 +589,11 @@
...
@@ -589,11 +589,11 @@
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/碧合app/execute_automation_scripts.py"
>
<entry
file=
"file://$PROJECT_DIR$/碧合app/execute_automation_scripts.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
-743
"
>
<state
relative-caret-position=
"
237
"
>
<caret
line=
"
14"
column=
"35"
selection-start-line=
"14"
selection-start-column=
"35"
selection-end-line=
"14"
selection-end-column=
"35
"
/>
<caret
line=
"
48"
column=
"41"
selection-start-line=
"48"
selection-start-column=
"41"
selection-end-line=
"48"
selection-end-column=
"41
"
/>
<folding>
<folding>
<element
signature=
"e#19#30#0"
expanded=
"true"
/>
<element
signature=
"e#19#30#0"
expanded=
"true"
/>
<marker
date=
"1547434
480403"
expanded=
"true"
signature=
"2655:3690
"
ph=
"..."
/>
<marker
date=
"1547434
571083"
expanded=
"true"
signature=
"2640:3675
"
ph=
"..."
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
...
...
碧合app/execute_automation_scripts.py
View file @
f58db26b
# cod
ing = utf-8
# cod
ing = utf-8
...
@@ -44,8 +44,8 @@ class PostmanApi():
...
@@ -44,8 +44,8 @@ class PostmanApi():
message
[
'From'
]
=
Header
(
"测试环境接口自动化测试"
)
message
[
'From'
]
=
Header
(
"测试环境接口自动化测试"
)
message
[
'Subject'
]
=
Header
(
years
+
at_the
+
"自动化测试结果"
,
'utf-8'
)
message
[
'Subject'
]
=
Header
(
years
+
at_the
+
"自动化测试结果"
,
'utf-8'
)
try
:
try
:
smtpObj
=
smtplib
.
SMTP_SSL
(
mail_host
,
465
)
smtpObj
=
smtplib
.
SMTP_SSL
()
# smtpObj.connect(mail_host,587
) # 25 为 SMTP 端口号
smtpObj
.
connect
(
mail_host
,
465
)
# 25 为 SMTP 端口号
smtpObj
.
login
(
mail_user
,
mail_pass
)
smtpObj
.
login
(
mail_user
,
mail_pass
)
smtpObj
.
sendmail
(
sender
,
receivers
,
message
.
as_string
())
smtpObj
.
sendmail
(
sender
,
receivers
,
message
.
as_string
())
smtpObj
.
quit
()
smtpObj
.
quit
()
...
...
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