From 8b2ccb55c665cf130b84de8c50a25dd67c037bd1 Mon Sep 17 00:00:00 2001 From: David Shafer Date: Fri, 5 Oct 2018 09:50:33 -0500 Subject: [PATCH 1/4] Working on tests --- All_Entities.robot | 24 + MDQ.robot | 23 + Single_Entity.robot | 76 ++ log.html | 2121 +++++++++++++++++++++++++++++++++++++ output.xml | 650 ++++++++++++ pip-selfcheck.json | 1 + report.html | 2420 +++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 5315 insertions(+) create mode 100644 All_Entities.robot create mode 100644 MDQ.robot create mode 100644 Single_Entity.robot create mode 100644 log.html create mode 100644 output.xml create mode 100644 pip-selfcheck.json create mode 100644 report.html diff --git a/All_Entities.robot b/All_Entities.robot new file mode 100644 index 0000000..5c5b077 --- /dev/null +++ b/All_Entities.robot @@ -0,0 +1,24 @@ +*** Settings *** +Library XML +Resource MDQ.robot + +*** Test Cases *** +Get All Entities + [Documentation] GET all entities + ${resp}= Get uri=/entities + Should Be Equal As Strings ${resp.status_code} 200 + #${root}= Parse XML ${resp.text} + #Should Be Equal ${root.tag} EntitiesDescriptor + +Gzip Encoding + [Documentation] GET all entities with gzip encoding + ${resp}= Get With Gzip uri=/entities/urn:mace:incommon:internet2.edu + Should Be Equal As Strings ${resp.status_code} 200 + Should Be Equal ${resp.encoding} gzip + #${root}= Parse XML ${resp.text} + #Should Be Equal ${root.tag} EntitiesDescriptor + +Head All Entities + [Documentation] HEAD all entities + ${resp}= Head uri=/entities + Should Be Equal As Strings ${resp.status_code} 200 diff --git a/MDQ.robot b/MDQ.robot new file mode 100644 index 0000000..6f2ed0d --- /dev/null +++ b/MDQ.robot @@ -0,0 +1,23 @@ +*** Settings *** +Library RequestsLibrary + +*** Keywords *** +Get + [Arguments] ${uri} + Create Session alias=md url=http://md.sandbox.ti.internet2.edu + ${resp}= Get Request alias=md uri=${uri} + [Return] ${resp} + +Get With Gzip + [Arguments] ${uri} + Create Session alias=md url=http://md.sandbox.ti.internet2.edu + &{headers}= Create Dictionary Accept-Encoding=gzip + ${resp}= Get Request alias=md uri=${uri} headers=&{headers} + [Return] ${resp} + +Head + [Arguments] ${uri} + Log ${uri} + Create Session alias=md url=http://md.sandbox.ti.internet2.edu + ${resp}= Head Request alias=md uri=${uri} + [Return] ${resp} diff --git a/Single_Entity.robot b/Single_Entity.robot new file mode 100644 index 0000000..630caec --- /dev/null +++ b/Single_Entity.robot @@ -0,0 +1,76 @@ +*** Settings *** +Library XML +Resource MDQ.robot + +*** Test Cases *** +URN-Style Entity ID + [Documentation] GET an entity with a URN-style entityID + [Tags] get urn + ${resp}= Get uri=/entities/urn:mace:incommon:internet2.edu + Should Be Equal As Strings ${resp.status_code} 200 + ${root}= Parse XML ${resp.text} + Should Be Equal ${root.tag} EntityDescriptor + +URL-Style Entity ID + [Documentation] GET an entity with a URL-style entityID + [Tags] get url + ${resp}= Get uri=/entities/https:%2f%2fcarmenwiki.osu.edu%2fshibboleth + Should Be Equal As Strings ${resp.status_code} 200 + ${root}= Parse XML ${resp.text} + Should Be Equal ${root.tag} EntityDescriptor + +Gzip Encoding + [Documentation] GET an entity with gzip encoding + [Tags] get urn gzip + ${resp}= Get With Gzip uri=/entities/urn:mace:incommon:internet2.edu + Should Be Equal As Strings ${resp.status_code} 200 + Should Be Equal ${resp.encoding} gzip + ${root}= Parse XML ${resp.text} + Should Be Equal ${root.tag} EntityDescriptor + +Colons Encoded + [Documentation] GET an entity with colons in the entityID percent-encoded + [Tags] get urn colons-encoded + ${resp}= Get uri=/entities/urn%3Amace%3Aincommon%3Ainternet2.edu + Should Be Equal As Strings ${resp.status_code} 200 + ${root}= Parse XML ${resp.text} + Should Be Equal ${root.tag} EntityDescriptor + +Lowercase Encoding + [Documentation] GET an entity using lowercase percent-encoding + [Tags] get url lowercase-encoding + ${resp}= Get uri=/entities/https:%2f%2fcarmenwiki.osu.edu%2fshibboleth + Should Be Equal As Strings ${resp.status_code} 200 + ${root}= Parse XML ${resp.text} + Should Be Equal ${root.tag} EntityDescriptor + +Uppercase Encoding + [Documentation] GET an entity using uppercase percent-encoding + [Tags] get url uppercase-encoding + ${resp}= Get uri=/entities/https:%2F%2Fcarmenwiki.osu.edu%2Fshibboleth + Should Be Equal As Strings ${resp.status_code} 200 + ${root}= Parse XML ${resp.text} + Should Be Equal ${root.tag} EntityDescriptor + + SHA-1 Hash (Lowercase) + [Documentation] GET an entity by the lowercase SHA-1 hash of its entityID + [Tags] get sha-1 lowercase + # `$ echo urn:mace:incommon:internet2.edu |shasum` + ${resp}= Get uri=/entities/15fd47b743804831a6a443a37170c8983116c7a2 + Should Be Equal As Strings ${resp.status_code} 200 + ${root}= Parse XML ${resp.text} + Should Be Equal ${root.tag} EntityDescriptor + +SHA-1 Hash (Uppercase) + [Documentation] GET an entity by the uppercase SHA-1 hash of its entityID + [Tags] get sha-1 uppercase + ${resp}= Get uri=/entities/15FD47B743804831A6A443A37170C8983116C7A2 + Should Be Equal As Strings ${resp.status_code} 200 + ${root}= Parse XML ${resp.text} + Should Be Equal ${root.tag} EntityDescriptor + +Head Entity + [Documentation] HEAD an entity + [Tags] head urn + ${resp}= Head uri=/entities/urn:mace:incommon:internet2.edu + Should Be Equal As Strings ${resp.status_code} 200 diff --git a/log.html b/log.html new file mode 100644 index 0000000..1c5cb13 --- /dev/null +++ b/log.html @@ -0,0 +1,2121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening Robot Framework log failed

+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/output.xml b/output.xml new file mode 100644 index 0000000..d94ada1 --- /dev/null +++ b/output.xml @@ -0,0 +1,650 @@ + + + + + + + +uri=/entities + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=http://md.sandbox.ti.internet2.edu + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=${uri} + + +${resp} + +Get Request using : alias=md, uri=/entities, headers=None json=None +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 + +Argument types are: +<class 'int'> +<type 'unicode'> + + +GET all entities + + + + + +uri=/entities/urn:mace:incommon:internet2.edu + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=http://md.sandbox.ti.internet2.edu + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Creates and returns a dictionary based on the given ``items``. + +Accept-Encoding=gzip + + +&{headers} + +&{headers} = { Accept-Encoding=gzip } + + + +Send a GET request on the session object found using the + +alias=md +uri=${uri} +headers=&{headers} + + +${resp} + +Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers={'Accept-Encoding': 'gzip'} json=None +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 + +Argument types are: +<class 'int'> +<type 'unicode'> + + + +Fails if the given objects are unequal. + +${resp.encoding} +gzip + +Argument types are: +<class 'NoneType'> +<type 'unicode'> +None != gzip + + +GET all entities with gzip encoding +None != gzip + + + + +uri=/entities + + +${resp} + + +Logs the given message with the given level. + +${uri} + +/entities + + + +Create Session: create a HTTP session to a server + +alias=md +url=http://md.sandbox.ti.internet2.edu + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a HEAD request on the session object found using the + +alias=md +uri=${uri} + + +${resp} + +Head Request using : alias=md, uri=/entities, headers=None, allow_redirects=False +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 + +Argument types are: +<class 'int'> +<type 'unicode'> + + +HEAD all entities + + + + + + + + +uri=/entities/urn:mace:incommon:internet2.edu + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=http://md.sandbox.ti.internet2.edu + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=${uri} + + +${resp} + +Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None json=None +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 + +Argument types are: +<class 'int'> +<type 'unicode'> + + + +Parses the given XML file or string into an element structure. + +${resp.text} + + +${root} + +${root} = <Element 'EntityDescriptor' at 0x1042ba598> + + + +Fails if the given objects are unequal. + +${root.tag} +EntityDescriptor + + + +GET an entity with a URN-style entityID + + + + + +uri=/entities/https:%2f%2fcarmenwiki.osu.edu%2fshibboleth + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=http://md.sandbox.ti.internet2.edu + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=${uri} + + +${resp} + +Get Request using : alias=md, uri=/entities/https:%2f%2fcarmenwiki.osu.edu%2fshibboleth, headers=None json=None +${resp} = <Response [403]> + + +${resp} = <Response [403]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 + +Argument types are: +<class 'int'> +<type 'unicode'> +403 != 200 + + +GET an entity with a URL-style entityID +403 != 200 + + + + +uri=/entities/urn:mace:incommon:internet2.edu + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=http://md.sandbox.ti.internet2.edu + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Creates and returns a dictionary based on the given ``items``. + +Accept-Encoding=gzip + + +&{headers} + +&{headers} = { Accept-Encoding=gzip } + + + +Send a GET request on the session object found using the + +alias=md +uri=${uri} +headers=&{headers} + + +${resp} + +Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers={'Accept-Encoding': 'gzip'} json=None +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 + +Argument types are: +<class 'int'> +<type 'unicode'> + + + +Fails if the given objects are unequal. + +${resp.encoding} +gzip + +Argument types are: +<class 'NoneType'> +<type 'unicode'> +None != gzip + + +GET an entity with gzip encoding +None != gzip + + + + +uri=/entities/urn%3Amace%3Aincommon%3Ainternet2.edu + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=http://md.sandbox.ti.internet2.edu + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=${uri} + + +${resp} + +Get Request using : alias=md, uri=/entities/urn%3Amace%3Aincommon%3Ainternet2.edu, headers=None json=None +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 + +Argument types are: +<class 'int'> +<type 'unicode'> + + + +Parses the given XML file or string into an element structure. + +${resp.text} + + +${root} + +${root} = <Element 'EntityDescriptor' at 0x1042ba548> + + + +Fails if the given objects are unequal. + +${root.tag} +EntityDescriptor + + + +GET an entity with colons in the entityID percent-encoded + + + + + +uri=/entities/https:%2f%2fcarmenwiki.osu.edu%2fshibboleth + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=http://md.sandbox.ti.internet2.edu + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=${uri} + + +${resp} + +Get Request using : alias=md, uri=/entities/https:%2f%2fcarmenwiki.osu.edu%2fshibboleth, headers=None json=None +${resp} = <Response [403]> + + +${resp} = <Response [403]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 + +Argument types are: +<class 'int'> +<type 'unicode'> +403 != 200 + + +GET an entity using lowercase percent-encoding +403 != 200 + + + + +uri=/entities/https:%2F%2Fcarmenwiki.osu.edu%2Fshibboleth + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=http://md.sandbox.ti.internet2.edu + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=${uri} + + +${resp} + +Get Request using : alias=md, uri=/entities/https:%2F%2Fcarmenwiki.osu.edu%2Fshibboleth, headers=None json=None +${resp} = <Response [403]> + + +${resp} = <Response [403]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 + +Argument types are: +<class 'int'> +<type 'unicode'> +403 != 200 + + +GET an entity using uppercase percent-encoding +403 != 200 + + + + +uri=/entities/15fd47b743804831a6a443a37170c8983116c7a2 + + +${resp} + + +Create Session: create a HTTP session to a server + +alias=md +url=http://md.sandbox.ti.internet2.edu + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a GET request on the session object found using the + +alias=md +uri=${uri} + + +${resp} + +Get Request using : alias=md, uri=/entities/15fd47b743804831a6a443a37170c8983116c7a2, headers=None json=None +${resp} = <Response [403]> + + +${resp} = <Response [403]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 + +Argument types are: +<class 'int'> +<type 'unicode'> +403 != 200 + + +GET an entity by the SHA-1 hash of its entityID +403 != 200 + + + + +uri=/entities/urn:mace:incommon:internet2.edu + + +${resp} + + +Logs the given message with the given level. + +${uri} + +/entities/urn:mace:incommon:internet2.edu + + + +Create Session: create a HTTP session to a server + +alias=md +url=http://md.sandbox.ti.internet2.edu + +Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 + + + +Send a HEAD request on the session object found using the + +alias=md +uri=${uri} + + +${resp} + +Head Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None, allow_redirects=False +${resp} = <Response [200]> + + +${resp} = <Response [200]> + + + +Fails if objects are unequal after converting them to strings. + +${resp.status_code} +200 + +Argument types are: +<class 'int'> +<type 'unicode'> + + +HEAD an entity + + + + + + + + +Critical Tests +All Tests + + + + +MDQ +MDQ.All Entities +MDQ.Single Entity + + + + + diff --git a/pip-selfcheck.json b/pip-selfcheck.json new file mode 100644 index 0000000..c99287e --- /dev/null +++ b/pip-selfcheck.json @@ -0,0 +1 @@ +{"last_check":"2018-10-04T16:45:36Z","pypi_version":"18.0"} \ No newline at end of file diff --git a/report.html b/report.html new file mode 100644 index 0000000..8ee7903 --- /dev/null +++ b/report.html @@ -0,0 +1,2420 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening Robot Framework report failed

+ +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From abcce424e7b9dbb2cbe5d81264f320b58d4b39b6 Mon Sep 17 00:00:00 2001 From: David Shafer Date: Fri, 5 Oct 2018 12:33:17 -0500 Subject: [PATCH 2/4] Clean up files --- log.html | 2121 -------------------------------------- output.xml | 650 ------------ pip-selfcheck.json | 1 - report.html | 2420 -------------------------------------------- 4 files changed, 5192 deletions(-) delete mode 100644 log.html delete mode 100644 output.xml delete mode 100644 pip-selfcheck.json delete mode 100644 report.html diff --git a/log.html b/log.html deleted file mode 100644 index 1c5cb13..0000000 --- a/log.html +++ /dev/null @@ -1,2121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Opening Robot Framework log failed

-
    -
  • Verify that you have JavaScript enabled in your browser.
  • -
  • Make sure you are using a modern enough browser. Firefox 3.5, IE 8, or equivalent is required, newer browsers are recommended.
  • -
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • -
-
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/output.xml b/output.xml deleted file mode 100644 index d94ada1..0000000 --- a/output.xml +++ /dev/null @@ -1,650 +0,0 @@ - - - - - - - -uri=/entities - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=http://md.sandbox.ti.internet2.edu - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=${uri} - - -${resp} - -Get Request using : alias=md, uri=/entities, headers=None json=None -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> - - -GET all entities - - - - - -uri=/entities/urn:mace:incommon:internet2.edu - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=http://md.sandbox.ti.internet2.edu - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Creates and returns a dictionary based on the given ``items``. - -Accept-Encoding=gzip - - -&{headers} - -&{headers} = { Accept-Encoding=gzip } - - - -Send a GET request on the session object found using the - -alias=md -uri=${uri} -headers=&{headers} - - -${resp} - -Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers={'Accept-Encoding': 'gzip'} json=None -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> - - - -Fails if the given objects are unequal. - -${resp.encoding} -gzip - -Argument types are: -<class 'NoneType'> -<type 'unicode'> -None != gzip - - -GET all entities with gzip encoding -None != gzip - - - - -uri=/entities - - -${resp} - - -Logs the given message with the given level. - -${uri} - -/entities - - - -Create Session: create a HTTP session to a server - -alias=md -url=http://md.sandbox.ti.internet2.edu - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a HEAD request on the session object found using the - -alias=md -uri=${uri} - - -${resp} - -Head Request using : alias=md, uri=/entities, headers=None, allow_redirects=False -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> - - -HEAD all entities - - - - - - - - -uri=/entities/urn:mace:incommon:internet2.edu - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=http://md.sandbox.ti.internet2.edu - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=${uri} - - -${resp} - -Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None json=None -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> - - - -Parses the given XML file or string into an element structure. - -${resp.text} - - -${root} - -${root} = <Element 'EntityDescriptor' at 0x1042ba598> - - - -Fails if the given objects are unequal. - -${root.tag} -EntityDescriptor - - - -GET an entity with a URN-style entityID - - - - - -uri=/entities/https:%2f%2fcarmenwiki.osu.edu%2fshibboleth - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=http://md.sandbox.ti.internet2.edu - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=${uri} - - -${resp} - -Get Request using : alias=md, uri=/entities/https:%2f%2fcarmenwiki.osu.edu%2fshibboleth, headers=None json=None -${resp} = <Response [403]> - - -${resp} = <Response [403]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> -403 != 200 - - -GET an entity with a URL-style entityID -403 != 200 - - - - -uri=/entities/urn:mace:incommon:internet2.edu - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=http://md.sandbox.ti.internet2.edu - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Creates and returns a dictionary based on the given ``items``. - -Accept-Encoding=gzip - - -&{headers} - -&{headers} = { Accept-Encoding=gzip } - - - -Send a GET request on the session object found using the - -alias=md -uri=${uri} -headers=&{headers} - - -${resp} - -Get Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers={'Accept-Encoding': 'gzip'} json=None -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> - - - -Fails if the given objects are unequal. - -${resp.encoding} -gzip - -Argument types are: -<class 'NoneType'> -<type 'unicode'> -None != gzip - - -GET an entity with gzip encoding -None != gzip - - - - -uri=/entities/urn%3Amace%3Aincommon%3Ainternet2.edu - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=http://md.sandbox.ti.internet2.edu - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=${uri} - - -${resp} - -Get Request using : alias=md, uri=/entities/urn%3Amace%3Aincommon%3Ainternet2.edu, headers=None json=None -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> - - - -Parses the given XML file or string into an element structure. - -${resp.text} - - -${root} - -${root} = <Element 'EntityDescriptor' at 0x1042ba548> - - - -Fails if the given objects are unequal. - -${root.tag} -EntityDescriptor - - - -GET an entity with colons in the entityID percent-encoded - - - - - -uri=/entities/https:%2f%2fcarmenwiki.osu.edu%2fshibboleth - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=http://md.sandbox.ti.internet2.edu - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=${uri} - - -${resp} - -Get Request using : alias=md, uri=/entities/https:%2f%2fcarmenwiki.osu.edu%2fshibboleth, headers=None json=None -${resp} = <Response [403]> - - -${resp} = <Response [403]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> -403 != 200 - - -GET an entity using lowercase percent-encoding -403 != 200 - - - - -uri=/entities/https:%2F%2Fcarmenwiki.osu.edu%2Fshibboleth - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=http://md.sandbox.ti.internet2.edu - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=${uri} - - -${resp} - -Get Request using : alias=md, uri=/entities/https:%2F%2Fcarmenwiki.osu.edu%2Fshibboleth, headers=None json=None -${resp} = <Response [403]> - - -${resp} = <Response [403]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> -403 != 200 - - -GET an entity using uppercase percent-encoding -403 != 200 - - - - -uri=/entities/15fd47b743804831a6a443a37170c8983116c7a2 - - -${resp} - - -Create Session: create a HTTP session to a server - -alias=md -url=http://md.sandbox.ti.internet2.edu - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a GET request on the session object found using the - -alias=md -uri=${uri} - - -${resp} - -Get Request using : alias=md, uri=/entities/15fd47b743804831a6a443a37170c8983116c7a2, headers=None json=None -${resp} = <Response [403]> - - -${resp} = <Response [403]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> -403 != 200 - - -GET an entity by the SHA-1 hash of its entityID -403 != 200 - - - - -uri=/entities/urn:mace:incommon:internet2.edu - - -${resp} - - -Logs the given message with the given level. - -${uri} - -/entities/urn:mace:incommon:internet2.edu - - - -Create Session: create a HTTP session to a server - -alias=md -url=http://md.sandbox.ti.internet2.edu - -Creating Session using : alias=md, url=http://md.sandbox.ti.internet2.edu, headers={}, cookies=None, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a HEAD request on the session object found using the - -alias=md -uri=${uri} - - -${resp} - -Head Request using : alias=md, uri=/entities/urn:mace:incommon:internet2.edu, headers=None, allow_redirects=False -${resp} = <Response [200]> - - -${resp} = <Response [200]> - - - -Fails if objects are unequal after converting them to strings. - -${resp.status_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> - - -HEAD an entity - - - - - - - - -Critical Tests -All Tests - - - - -MDQ -MDQ.All Entities -MDQ.Single Entity - - - - - diff --git a/pip-selfcheck.json b/pip-selfcheck.json deleted file mode 100644 index c99287e..0000000 --- a/pip-selfcheck.json +++ /dev/null @@ -1 +0,0 @@ -{"last_check":"2018-10-04T16:45:36Z","pypi_version":"18.0"} \ No newline at end of file diff --git a/report.html b/report.html deleted file mode 100644 index 8ee7903..0000000 --- a/report.html +++ /dev/null @@ -1,2420 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Opening Robot Framework report failed

-
    -
  • Verify that you have JavaScript enabled in your browser.
  • -
  • Make sure you are using a modern enough browser. Firefox 3.5, IE 8, or equivalent is required, newer browsers are recommended.
  • -
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • -
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 64c66239894ff7f1cf4c460dd6d2cf4f3c804732 Mon Sep 17 00:00:00 2001 From: David Shafer Date: Fri, 5 Oct 2018 12:34:05 -0500 Subject: [PATCH 3/4] Create .gitignore --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a3b32a3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +log.html +output.xml +pip-selfcheck.json +report.html From 32be518542a6c414f67248e71c5318fc42f9453c Mon Sep 17 00:00:00 2001 From: David Shafer Date: Fri, 12 Oct 2018 09:10:55 -0500 Subject: [PATCH 4/4] Initial version --- All_Entities.robot | 4 ++++ README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++ Single_Entity.robot | 19 ++++++++-------- __init__.robot | 4 ++++ 4 files changed, 73 insertions(+), 9 deletions(-) create mode 100644 __init__.robot diff --git a/All_Entities.robot b/All_Entities.robot index 5c5b077..9ce2c13 100644 --- a/All_Entities.robot +++ b/All_Entities.robot @@ -1,10 +1,12 @@ *** Settings *** Library XML Resource MDQ.robot +Default Tags all-entities *** Test Cases *** Get All Entities [Documentation] GET all entities + [Tags] http-get ${resp}= Get uri=/entities Should Be Equal As Strings ${resp.status_code} 200 #${root}= Parse XML ${resp.text} @@ -12,6 +14,7 @@ Get All Entities Gzip Encoding [Documentation] GET all entities with gzip encoding + [Tags] http-get gzip ${resp}= Get With Gzip uri=/entities/urn:mace:incommon:internet2.edu Should Be Equal As Strings ${resp.status_code} 200 Should Be Equal ${resp.encoding} gzip @@ -20,5 +23,6 @@ Gzip Encoding Head All Entities [Documentation] HEAD all entities + [Tags] http-head ${resp}= Head uri=/entities Should Be Equal As Strings ${resp.status_code} 200 diff --git a/README.md b/README.md index 0044e5c..a755f2e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,57 @@ # md-query-saml-uat + User acceptance tests for a service implementing the SAML metadata profile of the Metadata Query Protocol + + +## Prerequisites + +1. Install Robot Framework (see https://github.com/robotframework/robotframework/blob/master/INSTALL.rst) + + +## Quick Start + +1. Clone this repository: + ``` + git clone https://github.internet2.edu/internet2/md-query-saml-uat.git + ``` + +2. Run the robot test suite: + ``` + robot . + ``` + + +## Usage + +Run all tests: + +``` +robot . +``` + +Run metadata aggregate tests: + +``` +robot All_Entities.robot +``` + +Run single entity tests: + +``` +robot Single_Entity.robot +``` + + +## To Do + +1. Isolate Python dependencies with `virtualenv` or similar. + + +## Contributing + +1. Clone the repository. +2. Create a new feature branch (optionally named for a JIRA issue, if applicable, e.g. `MDQ-1234-my-feature`). +3. Commit your changes and push to GitHub Enterprise. +4. Create a pull request from your feature branch against the `master` branch. +5. Merge your pull request to the `master` branch. +6. After your changes are merged, you can delete your feature branch. diff --git a/Single_Entity.robot b/Single_Entity.robot index 630caec..caa9fb1 100644 --- a/Single_Entity.robot +++ b/Single_Entity.robot @@ -1,11 +1,12 @@ *** Settings *** Library XML Resource MDQ.robot +Default Tags single-entity *** Test Cases *** URN-Style Entity ID [Documentation] GET an entity with a URN-style entityID - [Tags] get urn + [Tags] http-get entity-id-urn ${resp}= Get uri=/entities/urn:mace:incommon:internet2.edu Should Be Equal As Strings ${resp.status_code} 200 ${root}= Parse XML ${resp.text} @@ -13,7 +14,7 @@ URN-Style Entity ID URL-Style Entity ID [Documentation] GET an entity with a URL-style entityID - [Tags] get url + [Tags] http-get entity-id-url ${resp}= Get uri=/entities/https:%2f%2fcarmenwiki.osu.edu%2fshibboleth Should Be Equal As Strings ${resp.status_code} 200 ${root}= Parse XML ${resp.text} @@ -21,7 +22,7 @@ URL-Style Entity ID Gzip Encoding [Documentation] GET an entity with gzip encoding - [Tags] get urn gzip + [Tags] http-get entity-id-urn gzip ${resp}= Get With Gzip uri=/entities/urn:mace:incommon:internet2.edu Should Be Equal As Strings ${resp.status_code} 200 Should Be Equal ${resp.encoding} gzip @@ -30,7 +31,7 @@ Gzip Encoding Colons Encoded [Documentation] GET an entity with colons in the entityID percent-encoded - [Tags] get urn colons-encoded + [Tags] http-get entity-id-urn encode-colons ${resp}= Get uri=/entities/urn%3Amace%3Aincommon%3Ainternet2.edu Should Be Equal As Strings ${resp.status_code} 200 ${root}= Parse XML ${resp.text} @@ -38,7 +39,7 @@ Colons Encoded Lowercase Encoding [Documentation] GET an entity using lowercase percent-encoding - [Tags] get url lowercase-encoding + [Tags] http-get entity-id-url encoding-lowercase ${resp}= Get uri=/entities/https:%2f%2fcarmenwiki.osu.edu%2fshibboleth Should Be Equal As Strings ${resp.status_code} 200 ${root}= Parse XML ${resp.text} @@ -46,7 +47,7 @@ Lowercase Encoding Uppercase Encoding [Documentation] GET an entity using uppercase percent-encoding - [Tags] get url uppercase-encoding + [Tags] http-get entity-id-url encoding-uppercase ${resp}= Get uri=/entities/https:%2F%2Fcarmenwiki.osu.edu%2Fshibboleth Should Be Equal As Strings ${resp.status_code} 200 ${root}= Parse XML ${resp.text} @@ -54,7 +55,7 @@ Uppercase Encoding SHA-1 Hash (Lowercase) [Documentation] GET an entity by the lowercase SHA-1 hash of its entityID - [Tags] get sha-1 lowercase + [Tags] http-get sha-1 sha-1-lowercase # `$ echo urn:mace:incommon:internet2.edu |shasum` ${resp}= Get uri=/entities/15fd47b743804831a6a443a37170c8983116c7a2 Should Be Equal As Strings ${resp.status_code} 200 @@ -63,7 +64,7 @@ Uppercase Encoding SHA-1 Hash (Uppercase) [Documentation] GET an entity by the uppercase SHA-1 hash of its entityID - [Tags] get sha-1 uppercase + [Tags] http-get sha-1 sha-1-uppercase ${resp}= Get uri=/entities/15FD47B743804831A6A443A37170C8983116C7A2 Should Be Equal As Strings ${resp.status_code} 200 ${root}= Parse XML ${resp.text} @@ -71,6 +72,6 @@ SHA-1 Hash (Uppercase) Head Entity [Documentation] HEAD an entity - [Tags] head urn + [Tags] http-head entity-id-urn ${resp}= Head uri=/entities/urn:mace:incommon:internet2.edu Should Be Equal As Strings ${resp.status_code} 200 diff --git a/__init__.robot b/__init__.robot new file mode 100644 index 0000000..e46f343 --- /dev/null +++ b/__init__.robot @@ -0,0 +1,4 @@ +*** Settings *** +Documentation Acceptance test suite for a service implementing the SAML +... metadata profile of the Metadata Query Protocol +... (https://tools.ietf.org/html/draft-young-md-query-saml-09).