Skip to content

Commit

Permalink
Merge pull request #441 from ppodgorsek/issue-430
Browse files Browse the repository at this point in the history
Issue #430 - Fix failing CI pipeline
  • Loading branch information
ppodgorsek authored Jun 22, 2023
2 parents a4377c0 + 4968e93 commit 14fb314
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 199 deletions.
27 changes: 15 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM fedora:36
FROM fedora:39

MAINTAINER Paul Podgorsek <[email protected]>
LABEL description Robot Framework in Docker.
Expand Down Expand Up @@ -30,21 +30,21 @@ ENV ROBOT_GID 1000

# Dependency versions
ENV ALPINE_GLIBC 2.35-r0
ENV AWS_CLI_VERSION 1.25.81
ENV AWS_CLI_VERSION 1.27.157
ENV AXE_SELENIUM_LIBRARY_VERSION 2.1.6
ENV BROWSER_LIBRARY_VERSION 14.0.0
ENV CHROMIUM_VERSION 103.0
ENV BROWSER_LIBRARY_VERSION 16.2.0
ENV CHROMIUM_VERSION 114.0
ENV DATABASE_LIBRARY_VERSION 1.2.4
ENV DATADRIVER_VERSION 1.6.0
ENV DATADRIVER_VERSION 1.8.1
ENV DATETIMETZ_VERSION 1.0.6
ENV FAKER_VERSION 5.0.0
ENV FIREFOX_VERSION 104.0
ENV FIREFOX_VERSION 114.0
ENV FTP_LIBRARY_VERSION 1.9
ENV GECKO_DRIVER_VERSION v0.30.0
ENV IMAP_LIBRARY_VERSION 0.4.5
ENV PABOT_VERSION 2.15.0
ENV REQUESTS_VERSION 0.9.3
ENV ROBOT_FRAMEWORK_VERSION 6.0.2
ENV GECKO_DRIVER_VERSION v0.33.0
ENV IMAP_LIBRARY_VERSION 0.4.6
ENV PABOT_VERSION 2.16.0
ENV REQUESTS_VERSION 0.9.5
ENV ROBOT_FRAMEWORK_VERSION 6.1
ENV SELENIUM_LIBRARY_VERSION 6.1.0
ENV SSH_LIBRARY_VERSION 3.8.0
ENV XVFB_VERSION 1.20
Expand Down Expand Up @@ -93,7 +93,10 @@ RUN pip3 install \
axe-selenium-python==$AXE_SELENIUM_LIBRARY_VERSION \
PyYAML \
# Install awscli to be able to upload test reports to AWS S3
awscli==$AWS_CLI_VERSION
awscli==$AWS_CLI_VERSION \
# Install an older Selenium version to avoid issues when running tests
# https://github.com/robotframework/SeleniumLibrary/issues/1835
selenium==4.9.0

# Gecko drivers
RUN dnf install -y \
Expand Down
183 changes: 0 additions & 183 deletions test/requests.robot
Original file line number Diff line number Diff line change
Expand Up @@ -15,186 +15,3 @@ Get Requests
Should Be Equal As Strings ${resp.status_code} 200
${resp}= GET On Session bing /
Should Be Equal As Strings ${resp.status_code} 200

Get Requests with Url Parameters
[Tags] get
Create Session httpbin http://httpbin.org
&{params}= Create Dictionary key=value key2=value2
${resp}= GET On Session httpbin /get params=${params}
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal ${resp.json()['args']} ${params}

Get HTTPS & Verify Cert
[Tags] get get-cert
Create Session httpbin https://httpbin.org verify=True
${resp}= GET On Session httpbin /get
Should Be Equal As Strings ${resp.status_code} 200

Post Request With URL Params
[Tags] post
Create Session httpbin http://httpbin.org
&{params}= Create Dictionary key=value key2=value2
${resp}= POST On Session httpbin /post params=${params}
Should Be Equal As Strings ${resp.status_code} 200

Post Request With No Data
[Tags] post
Create Session httpbin http://httpbin.org
${resp}= POST On Session httpbin /post
Should Be Equal As Strings ${resp.status_code} 200

Put Request With No Data
[Tags] put
Create Session httpbin http://httpbin.org
${resp}= PUT On Session httpbin /put
Should Be Equal As Strings ${resp.status_code} 200

Post Request With No Dictionary
[Tags] post
Create Session httpbin http://httpbin.org debug=3
Set Test Variable ${data} some content
${resp}= POST On Session httpbin /post data=${data}
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.text} ${data}

Put Request With URL Params
[Tags] put
Create Session httpbin http://httpbin.org
&{params}= Create Dictionary key=value key2=value2
${resp}= PUT On Session httpbin /put params=${params}
Should Be Equal As Strings ${resp.status_code} 200

Put Request With No Dictionary
[Tags] put
Create Session httpbin http://httpbin.org
Set Test Variable ${data} some content
${resp}= PUT On Session httpbin /put data=${data}
Should Be Equal As Strings ${resp.status_code} 200
Should Contain ${resp.text} ${data}

Post Requests
[Tags] post
Create Session httpbin http://httpbin.org
&{data}= Create Dictionary name=bulkan surname=evcimen
&{headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
${resp}= POST On Session httpbin /post data=${data} headers=${headers}
Dictionary Should Contain Value ${resp.json()['form']} bulkan
Dictionary Should Contain Value ${resp.json()['form']} evcimen

Post With Unicode Data
[Tags] post
Create Session httpbin http://httpbin.org debug=3
&{data}= Create Dictionary name=度假村
&{headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
${resp}= POST On Session httpbin /post data=${data} headers=${headers}
Dictionary Should Contain Value ${resp.json()['form']} 度假村

Post Request With Unicode Data
[Tags] post
Create Session httpbin http://httpbin.org debug=3
&{data}= Create Dictionary name=度假村
&{headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
${resp}= POST On Session httpbin /post data=${data} headers=${headers}
Dictionary Should Contain Value ${resp.json()['form']} 度假村

Post Request With Data and File
[Tags] post
Create Session httpbin http://httpbin.org
&{data}= Create Dictionary name=mallikarjunarao surname=kosuri
Create File foobar.txt content=foobar
${file_data}= Get File foobar.txt
&{files}= Create Dictionary file=${file_data}
${resp}= POST On Session httpbin /post files=${files} data=${data}
Should Be Equal As Strings ${resp.status_code} 200

Put Requests
[Tags] put
Create Session httpbin http://httpbin.org
&{data}= Create Dictionary name=bulkan surname=evcimen
&{headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
${resp}= PUT On Session httpbin /put data=${data} headers=${headers}
Dictionary Should Contain Value ${resp.json()['form']} bulkan
Dictionary Should Contain Value ${resp.json()['form']} evcimen

Head Request
[Tags] head
Create Session httpbin http://httpbin.org
${resp}= HEAD On Session httpbin /headers
Should Be Equal As Strings ${resp.status_code} 200

Options Request
[Tags] options
Create Session httpbin http://httpbin.org
${resp}= OPTIONS On Session httpbin /headers
Should Be Equal As Strings ${resp.status_code} 200
Dictionary Should Contain Key ${resp.headers} allow

Delete Request With URL Params
[Tags] delete
Create Session httpbin http://httpbin.org
${resp}= DELETE On Session httpbin url=/delete?key=value&key2=value2
Should Be Equal As Strings ${resp.status_code} 200

Delete Request With No Data
[Tags] delete
Create Session httpbin http://httpbin.org
${resp}= DELETE On Session httpbin /delete
Should Be Equal As Strings ${resp.status_code} 200

Delete Request With Data
[Tags] delete
Create Session httpbin http://httpbin.org debug=3
&{data}= Create Dictionary name=bulkan surname=evcimen
${resp}= DELETE On Session httpbin /delete data=${data}
Should Be Equal As Strings ${resp.status_code} 200
Log ${resp.content}
Comment Dictionary Should Contain Value ${resp.json()['data']} bulkan
Comment Dictionary Should Contain Value ${resp.json()['data']} evcimen

Patch Requests
[Tags] patch
Create Session httpbin http://httpbin.org
&{data}= Create Dictionary name=bulkan surname=evcimen
&{headers}= Create Dictionary Content-Type=application/x-www-form-urlencoded
${resp}= PATCH On Session httpbin /patch data=${data} headers=${headers}
Dictionary Should Contain Value ${resp.json()['form']} bulkan
Dictionary Should Contain Value ${resp.json()['form']} evcimen

Post Request With Redirection
[Tags] post
Create Session jigsaw http://jigsaw.w3.org
${resp}= POST On Session jigsaw /HTTP/300/302.html
Should Be Equal As Strings ${resp.status_code} 200
${resp}= POST On Session jigsaw /HTTP/300/302.html allow_redirects=${true}
Should Be Equal As Strings ${resp.status_code} 200

Post Request Without Redirection
[Tags] post
Create Session jigsaw http://jigsaw.w3.org debug=3
${resp}= POST On Session jigsaw /HTTP/300/302.html allow_redirects=${false}
${status}= Convert To String ${resp.status_code}
Should Start With ${status} 30

Put Request With Redirection
[Tags] put
Create Session jigsaw http://jigsaw.w3.org debug=3
${resp}= PUT On Session jigsaw /HTTP/300/302.html
Should Be Equal As Strings ${resp.status_code} 200
${resp}= PUT On Session jigsaw /HTTP/300/302.html allow_redirects=${true}
Should Be Equal As Strings ${resp.status_code} 200

Put Request Without Redirection
[Tags] put
Create Session jigsaw http://jigsaw.w3.org
${resp}= PUT On Session jigsaw /HTTP/300/302.html allow_redirects=${false}
${status}= Convert To String ${resp.status_code}
Should Start With ${status} 30

Do Not Pretty Print a JSON object
[Tags] json
Comment Define json variable.
Create Session httpbin http://httpbin.org
&{var}= Create Dictionary key_one=true key_two=this is a test string
${resp}= GET On Session httpbin /get params=${var}
Should Be Equal As Strings ${resp.status_code} 200
Dictionaries Should Be Equal ${resp.json()['args']} ${var}
4 changes: 0 additions & 4 deletions test/selenium.robot
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ Visit Bing
Visit Google
Open Browser https://www.google.com ${BROWSER}
Capture Page Screenshot

Visit Yahoo
Open Browser https://search.yahoo.com ${BROWSER}
Capture Page Screenshot

0 comments on commit 14fb314

Please sign in to comment.