Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
4385a2bb
Commit
4385a2bb
authored
Dec 04, 2017
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scalability_text: fixing test suite createPerson
parent
d7b7c73d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
22 deletions
+2
-22
scalability_test/example/createPerson.py
scalability_test/example/createPerson.py
+2
-22
No files found.
scalability_test/example/createPerson.py
View file @
4385a2bb
...
@@ -8,26 +8,6 @@ TMIN_SLEEP_LONG = 10
...
@@ -8,26 +8,6 @@ TMIN_SLEEP_LONG = 10
TMAX_SLEEP_LONG
=
30
TMAX_SLEEP_LONG
=
30
def
createPerson
(
result
,
browser
):
def
createPerson
(
result
,
browser
):
"""
Create a Person and add a telephone number. It can be ran infinitely (e.g.
until it is interrupted by the end user) with 1 concurrent user, through
performance_tester_erp5 with the following command:
performance_tester_erp5 http://foo.bar:4242/erp5/ 1 createPerson
Please note that you must run this command from the same directory of this
script and userInfo.py. Further information about performance_tester_erp5
options and arguments are available by specifying ``--help''.
This test requires the bt5 erp5_simulation_performance_test to be installed
for relation with organisation.
Also, in order to get more realistic results with concurrent users, random
sleep must be introduced to simulate a "real" user. This can be done through
'sleep' parameter (a tuple giving the minimum and maximum sleep time) to
open*() (Browser instance), submit*() (Form instance) and click*() (Link
instance).
"""
# Open ERP5 homepage
# Open ERP5 homepage
browser
.
open
(
sleep
=
(
TMIN_SLEEP_SHORT
,
TMAX_SLEEP_SHORT
))
browser
.
open
(
sleep
=
(
TMIN_SLEEP_SHORT
,
TMAX_SLEEP_SHORT
))
...
@@ -49,7 +29,7 @@ def createPerson(result, browser):
...
@@ -49,7 +29,7 @@ def createPerson(result, browser):
browser
.
mainForm
.
getControl
(
name
=
'field_my_first_name'
).
value
=
'Create'
browser
.
mainForm
.
getControl
(
name
=
'field_my_first_name'
).
value
=
'Create'
browser
.
mainForm
.
getControl
(
name
=
'field_my_last_name'
).
value
=
'Person'
browser
.
mainForm
.
getControl
(
name
=
'field_my_last_name'
).
value
=
'Person'
result
(
'Save'
,
browser
.
mainForm
.
submitSave
(
sleep
=
(
TMIN_SLEEP
,
TMAX_SLEEP
)))
result
(
'Save'
,
browser
.
mainForm
.
submitSave
(
sleep
=
(
TMIN_SLEEP
,
TMAX_SLEEP
)))
# Check whether the changes have been successfully updated
# Check whether the changes have been successfully updated
assert
browser
.
getTransitionMessage
()
==
'Data updated.'
assert
browser
.
getTransitionMessage
()
==
'Data updated.'
...
@@ -69,4 +49,4 @@ result('Save', browser.mainForm.submitSave(sleep=(TMIN_SLEEP, TMAX_SLEEP)))
...
@@ -69,4 +49,4 @@ result('Save', browser.mainForm.submitSave(sleep=(TMIN_SLEEP, TMAX_SLEEP)))
result
(
'Waiting for validate_action'
,
waiting_for_validate_action
)
result
(
'Waiting for validate_action'
,
waiting_for_validate_action
)
result
(
'Show validate'
,
show_validate_time
)
result
(
'Show validate'
,
show_validate_time
)
result
(
'Validated'
,
browser
.
mainForm
.
submitDialogConfirm
())
result
(
'Validated'
,
browser
.
mainForm
.
submitDialogConfirm
())
assert
browser
.
getTransitionMessage
()
==
'Status changed.'
assert
browser
.
getTransitionMessage
()
==
'Status changed.'
\ No newline at end of file
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