Skip to content

Commit 36687cc

Browse files
authored
Merge pull request #62 from emanlove/update-azure-test-fixture
Update azure test fixture
2 parents 163f96f + fd2deae commit 36687cc

File tree

9 files changed

+93
-83
lines changed

9 files changed

+93
-83
lines changed

assets/templates/bigpage.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
</style>
2626
</head>
27-
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
27+
<script src="//code.jquery.com/jquery-3.6.0.min.js"></script>
2828
<script type="text/javascript" src="code.js"></script>
2929
<body>
3030
<div class="bigcontainer">

assets/templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
</style>
6767
</head>
68-
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
68+
<script src="//code.jquery.com/jquery-3.6.0.min.js"></script>
6969
<script type="text/javascript" src="code.js"></script>
7070
<body>
7171
<table border="1">
Lines changed: 52 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,69 @@
11
*** Settings ***
22
Documentation Verifies automatic injection & waiting features
33
Suite Setup Start Flask App
4-
Suite Teardown Final Report
4+
Suite Teardown Internal Suite Teardown
55
Test Template Automatically Call Testability Ready
6-
Library SeleniumLibrary timeout=2 seconds plugins=${CURDIR}/../src/SeleniumTestability;True;29 seconds;False
6+
Library SeleniumLibrary plugins=${CURDIR}/../src/SeleniumTestability;True;60 seconds;False
77
Library Timer
88
Resource resources.robot
99

1010
*** Test Cases ***
11-
Testability in Firefox
12-
${FF} 20 seconds 30 seconds
11+
Verify Fetch In Firefox
12+
${FF} fetch not executed executed at least once 3.5 4.5
1313

14-
Testability in Chrome
15-
${GC} 20 seconds 30 seconds
14+
Verify Timeout In Firefox
15+
${FF} shorttimeout not executed executed at least once 3.5 4.5
16+
17+
Verify XHR In Firefox
18+
${FF} xhr not executed executed at least once 3.5 4.5
19+
20+
Verify CSS Transition In Firefox
21+
${FF} transition not executed executed at least once 3.5 4.5
22+
23+
Verify CSS Animation In Firefox
24+
${FF} animate not executed executed at least once 3.5 4.5
25+
26+
Verify Fetch In Chrome
27+
${GC} fetch not executed executed at least once 3.5 4.5
28+
29+
Verify Timeout In Chrome
30+
${GC} shorttimeout not executed executed at least once 3.5 4.5
31+
32+
Verify XHR In Chrome
33+
${GC} xhr not executed executed at least once 3.5 4.5
34+
35+
Verify CSS Transition In Chrome
36+
${GC} transition not executed executed at least once 3.5 4.5
37+
38+
Verify CSS Animation In Chrome
39+
${GC} animate not executed executed at least once 3.5 4.5
1640

1741
*** Keywords ***
18-
Final Report
42+
Add Final Benchmark Table
1943
[Documentation] Verifies that all timers done during the suite are passing
20-
Stop Flask App
2144
Verify All Timers fail_on_errors=False
45+
46+
Internal Suite Teardown
47+
[Documentation] Final teardown
48+
Add Final Benchmark Table
49+
Teardown Test Environment
2250
Remove All Timers
2351

2452
Automatically Call Testability Ready
25-
[Arguments] ${BROWSER} ${HIGHER_THAN} ${LOWER_THAN}
26-
[Documentation] test template for automatic waiting and injection
27-
28-
&{longfetch}= Create Dictionary url=.*longfetch.* method=GET
29-
@{blacklist}= Create List ${longfetch}
30-
${tc}= Create Dictionary maxTimeout=5000 blacklist=${blacklist}
31-
Set Testability Config ${tc}
32-
33-
Setup Web Environment ${BROWSER} ${URL}
34-
Click All And Verify ${HIGHER_THAN} ${LOWER_THAN}
35-
[Teardown] Teardown Web Environment
36-
37-
Click All And Verify
38-
[Arguments] ${HIGHER_THAN} ${LOWER_THAN}
39-
[Documentation] Click and verify enough time is passing
40-
Start Timer ${TEST NAME}
41-
Click Element id:fetch-button
42-
Click Element id:shorttimeout-button
43-
Click Element id:xhr-button
44-
Click Element id:transition-button
45-
Click Element id:animate-button
53+
[Arguments] ${BROWSER} ${ID} ${PRE_MESSAGE} ${POST_MESSAGE} ${HIGHER_THAN} ${LOWER_THAN}
54+
[Documentation] test template for manual waiting & injection tests
55+
Setup Web Environment ${BROWSER} ${URL}
56+
Element Text Should Be id:${id}-result ${PRE_MESSAGE}
57+
Start Timer ${TEST NAME}-onClick
58+
Click Element id:${id}-button
59+
Stop Timer ${TEST NAME}-onClick
60+
Start Timer ${TEST NAME}-onGetText
61+
Element Text Should Be id:${id}-result ${POST_MESSAGE}
62+
Stop Timer ${TEST NAME}-onGetText
63+
Start Timer ${TEST NAME}-onWait
4664
Wait For Testability Ready
47-
Stop Timer ${TEST NAME}
48-
Verify Single Timer ${LOWER_THAN} ${HIGHER_THAN} ${TEST NAME}
49-
${TIMEOUT}= Get Selenium Timeout
50-
Should Be Equal ${TIMEOUT} 2 seconds
65+
Stop Timer ${TEST NAME}-onWait
66+
Verify Single Timer 0.5 0 ${TEST NAME}-onClick
67+
Verify Single Timer ${LOWER_THAN} ${HIGHER_THAN} ${TEST NAME}-onGetText
68+
Verify Single Timer 0.5 0 ${TEST NAME}-onWait
69+
[Teardown] Teardown Web Environment

atest/manual_wait_for_testability.robot

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,61 +9,56 @@ Resource resources.robot
99

1010
*** Test Cases ***
1111
Verify Fetch In Firefox
12-
${FF} fetch-button
12+
${FF} fetch-button 3.5 4.5
1313

1414
Verify Timeout In Firefox
15-
${FF} shorttimeout-button
15+
${FF} shorttimeout-button 3.5 4.5
1616

1717
Verify XHR In Firefox
18-
${FF} xhr-button
18+
${FF} xhr-button 3.5 4.5
1919

2020
Verify CSS Transition In Firefox
21-
${FF} transition-button
21+
${FF} transition-button 3.5 4.5
2222

2323
Verify CSS Animation In Firefox
24-
${FF} animate-button
24+
${FF} animate-button 3.5 4.5
2525

2626
Verify Fetch In Chrome
27-
${GC} fetch-button
27+
${GC} fetch-button 3.5 4.5
2828

2929
Verify Timeout In Chrome
30-
${GC} shorttimeout-button
30+
${GC} shorttimeout-button 3.5 4.5
3131

3232
Verify XHR In Chrome
33-
${GC} xhr-button
33+
${GC} xhr-button 3.5 4.5
3434

3535
Verify CSS Transition In Chrome
36-
${GC} transition-button
36+
${GC} transition-button 3.5 4.5
3737

3838
Verify CSS Animation In Chrome
39-
${GC} animate-button
39+
${GC} animate-button 3.5 4.5
4040

4141
*** Keywords ***
4242
Add Final Benchmark Table
4343
[Documentation] Verifies that all timers done during the suite are passing
4444
Verify All Timers fail_on_errors=False
4545

46-
Manual Wait For Testability Ready
47-
[Arguments] ${BROWSER} ${ID}
48-
[Documentation] test template for manual waiting & injection tests
49-
Setup Web Environment ${BROWSER} ${URL}
50-
Set Selenium Timeout 1 second
51-
Start Timer ${TEST NAME}
52-
Click And Wait ${ID}
53-
Stop Timer ${TEST NAME}
54-
Verify Single Timer 10 seconds 3.5 seconds ${TEST NAME}
55-
${TIMEOUT}= Get Selenium Timeout
56-
Should Be Equal ${TIMEOUT} 1 second
57-
[Teardown] Teardown Web Environment
58-
59-
Click And Wait
60-
[Arguments] ${id}
61-
[Documentation] Clicks element and manually waits for testability.
62-
Click Element id:${id}
63-
Wait For Testability Ready error_on_timeout=YES
64-
6546
Internal Suite Teardown
6647
[Documentation] Final teardown
6748
Add Final Benchmark Table
6849
Teardown Test Environment
6950
Remove All Timers
51+
52+
Manual Wait For Testability Ready
53+
[Arguments] ${BROWSER} ${ID} ${HIGHER_THAN} ${LOWER_THAN}
54+
[Documentation] test template for manual waiting & injection tests
55+
Setup Web Environment ${BROWSER} ${URL}
56+
Start Timer ${TEST NAME}-onClick
57+
Click Element id:${id}
58+
Stop Timer ${TEST NAME}-onClick
59+
Start Timer ${TEST NAME}-onWait
60+
Wait For Testability Ready
61+
Stop Timer ${TEST NAME}-onWait
62+
Verify Single Timer ${LOWER_THAN} ${HIGHER_THAN} ${TEST NAME}-onWait
63+
Verify Single Timer 0.5 0 ${TEST NAME}-onClick
64+
[Teardown] Teardown Web Environment

atest/resources.robot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Setup Web Environment
1919
${URL}= Set Variable ${URL}
2020
${FF_PROFILE}= Generate Firefox Profile
2121
Set Selenium Speed 0 seconds
22+
Set Selenium Timeout 10 seconds
2223
Open Browser ${URL} browser=${BROWSER} ff_profile_dir=${FF_PROFILE.path}
2324
Wait For Document Ready
2425

azure-pipelines.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,28 @@ jobs:
1111
- template: azure/job_template.yml
1212
parameters:
1313
name: 'OSX'
14-
vmImage: 'macOS-10.14'
14+
vmImage: 'macOS-latest'
1515
coverage: 'false'
1616
timeout: 20
17-
chromedriver: '83.0.4103.39'
18-
geckodriver: 'latest'
17+
chromedriver: '96.0.4664.45'
18+
geckodriver: 'v0.30.0'
1919
- template: azure/job_template.yml
2020
parameters:
2121
name: 'Windows'
2222
vmImage: 'VS2017-Win2016'
2323
robotPrefix: 'PATH=~/bin:${PATH}'
2424
coverage: 'false'
2525
timeout: 30
26-
chromedriver: '83.0.4103.39'
27-
geckodriver: 'v0.26.0'
26+
chromedriver: 'latest'
27+
geckodriver: 'latest'
2828
- template: azure/job_template.yml
2929
parameters:
3030
name: 'Linux'
31-
vmImage: 'ubuntu-16.04'
31+
vmImage: 'ubuntu-20.04'
3232
robotPrefix: 'PATH=~/bin:${PATH} xvfb-run --auto-servernum --server-args="-screen 1, 1600x900x24"'
3333
coverage: 'true'
3434
timeout: 20
35-
chromedriver: '83.0.4103.39'
35+
chromedriver: '96.0.4664.45'
3636
geckodriver: 'latest'
3737
- template: azure/artifacts.yml
3838
parameters:

azure/job_template.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ jobs:
1010
vmImage: ${{ parameters.vmImage }}
1111
strategy:
1212
matrix:
13-
Python36:
13+
Python37:
1414
os_name: ${{ parameters.name }}
1515
coverage: ${{ parameters.coverage}}
16-
python_version: '3.6'
16+
python_version: '3.7'
1717
outputdir: testresults
1818
geckodriver: ${{ parameters.geckodriver }}
1919
chromedriver: ${{ parameters.chromedriver}}
20-
Python37:
20+
Python38:
2121
os_name: ${{ parameters.name }}
2222
coverage: ${{ parameters.coverage}}
23-
python_version: '3.7'
23+
python_version: '3.8'
2424
outputdir: testresults
2525
geckodriver: ${{ parameters.geckodriver }}
2626
chromedriver: ${{ parameters.chromedriver}}
@@ -51,15 +51,9 @@ jobs:
5151
5252
- bash: |
5353
inv webdrivers --chromedriver=$(chromedriver) --geckodriver=$(geckodriver)
54+
condition: ne( variables['os_name'], 'OSX' )
5455
displayName: Webdrivers
5556
56-
- bash: |
57-
brew update
58-
brew tap caskroom/cask
59-
brew cask install firefox google-chrome
60-
condition: eq( variables['Agent.OS'], 'Darwin' )
61-
displayName: Install Latest Browsers on OSX
62-
6357
- bash: |
6458
sudo apt-get update --yes
6559
sudo apt-get install firefox google-chrome-stable --yes

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Flask==1.0.2
22
Flask-BasicAuth
33
twine
4+
mistune>=2.0.2
45
m2r
56
python-language-server[all]
67
black

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
License :: OSI Approved :: Apache Software License
2929
Programming Language :: Python
3030
Programming Language :: Python :: 3
31-
Programming Language :: Python :: 3.6
3231
Programming Language :: Python :: 3.7
32+
Programming Language :: Python :: 3.8
3333
Topic :: Software Development :: Testing
3434
Framework :: Robot Framework
3535
Framework :: Robot Framework :: Library

0 commit comments

Comments
 (0)