-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverview.html
41 lines (41 loc) · 12.5 KB
/
overview.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<html><head><title>Robot Test Case Documentation</title>
<style>
table { border-collapse: collapse; width: 100%; }
th { background-color: #444; color: white; padding: 8px; }
td { background-color: #eee; padding: 8px; }
tr:nth-child(even) td { background-color: #ddd; }
</style>
</head><body>
<table border='1'><tr><th>File Name</th><th>Test Case</th><th>Documentation</th></tr>
<tr><td>01_library_initialization.robot</td><td>01_ImportLibrary_Default</td><td>Import the XmlValidator library without arguments and verify the correct initialization of the schema and error_facets _attribute</td></tr>
<tr><td>01_library_initialization.robot</td><td>02_ImportLibrary_With_XSD</td><td>Import the XmlValidator library, passing an XSD schema file and verify correct initialization of the schema attribute</td></tr>
<tr><td>01_library_initialization.robot</td><td>03_ImportLibrary_With_Base_URL</td><td>Import the XmlValidator library with a an XSD schema file *and* a base URL (referencing an XSD include file) and verify the correct initialization of the schema attribute</td></tr>
<tr><td>01_library_initialization.robot</td><td>04_ImportLibrary_With_Error_Facets</td><td>Import the XmlValidator library with custom error facets and verify the correct initialization of the error_facets attribute</td></tr>
<tr><td>01_library_initialization.robot</td><td>05_ImportLibrary_Invalid_XSD</td><td>Attempt to import the XmlValidator library with an invalid XSD file and verify the informative and structured error message that the library constructs and returns</td></tr>
<tr><td>01_library_initialization.robot</td><td>06_ImportLibrary_Multiple_XSDs</td><td>Attempt to import the XmlValidator library with multiple XSD files and verify the informative and structured error message that the library constructs and returns</td></tr>
<tr><td>02_basic_validation.robot</td><td>07_Validate_Single_Valid_XML</td><td>Validate a single, valid XML file against a valid XSD schema Should return no error(s) and hence shouldn't write a CSV file</td></tr>
<tr><td>02_basic_validation.robot</td><td>08_Validate_Single_Invalid_XML</td><td>Validate a single, invalid XML file against a valid XSD schema and verify the correctness of the error reporting of the keyword The latter means we validate the list of errors the keyword returns and the corresponding CSV file it should have created (containing the collected errors in CSV format)</td></tr>
<tr><td>02_basic_validation.robot</td><td>09_Validate_Multiple_Valid_XMLs</td><td>Validate multiple valid XML files against a single, valid XSD schema Should return no error(s) and hence shouldn't write a CSV file</td></tr>
<tr><td>02_basic_validation.robot</td><td>10_Validate_Multiple_XMLs_With_Multiple_XSDs</td><td>Validate multiple valid XML files against multiple XSD schemas Should return no error(s) and hence shouldn't write a CSV file By passing 'by_file_name' as ``xsd_search_strategy``, each XML files are is matched to its corresponding XSD file (namely the XSD file that has the same file name as its XML counterpart)</td></tr>
<tr><td>02_basic_validation.robot</td><td>11_Validate_Mixed_Results_With_Single_XSD</td><td>Validate multiple XML files against a single XSD schema where some files pass validation and others fail The test case subsequently validates the expected validation results that the keyword should return/report</td></tr>
<tr><td>02_basic_validation.robot</td><td>12_Validate_Mixed_Results_With_Multiple_XSDs</td><td>Validate multiple XML files against multiple XSD schemas where some files pass validation and others fail The test case subsequently validates the expected validation results that the keyword should return/report Note from the log that the XML and XSD files will be matched dynamically, using their namespaces as matching strategy</td></tr>
<tr><td>02_basic_validation.robot</td><td>13_ImportLibrary_Change_Schema_On_Validation</td><td>Import the XmlValidator library with an XSD file, validate that the schema attribute is correctly set, then call the Validate XML Files keyword with a valid XML file and a *new* XSD file, verifying that the new schema is correctly set and used for validation Note: This test case should probably be moved to another test suite file</td></tr>
<tr><td>02_basic_validation.robot</td><td>14_Validate_Malformed_XML</td><td>Attempt to validate a malformed XML file and verify that a parse/syntax error is collected and reported</td></tr>
<tr><td>03_error_handling.robot</td><td>15_Import_With_Non_Existing_XSD</td><td>Attempt import: - once with a path to a non-existent XSD file - once with a path to an an empty folder - once with a path to a non-xsd file Verify that the library catches the errors and constructs and reports an informative error message</td></tr>
<tr><td>03_error_handling.robot</td><td>16_Validate_Non_Existing_XML</td><td>Attempt to validate a non-existent XML file and verify that the library catches the error and constructs and reports an informative error message</td></tr>
<tr><td>03_error_handling.robot</td><td>17_Validate_Against_Malformed_XSD</td><td>Attempt to validate an XML against malformed XSD files and verify that the library catches the errors and constructs and reports an informative error message</td></tr>
<tr><td>03_error_handling.robot</td><td>18_Validate_Non_Existing_XSD</td><td>Attempt validation of an XML file: - once with a path to a non-existent XSD file - once with a path to an an empty folder - once with a path to a non-xsd file Verify that the library catches the errors and constructs and reports an informative error message</td></tr>
<tr><td>04_schema_resolution.robot</td><td>19_Validate_Using_Namespace_Matching_Different_folders</td><td>Validate XML files against XSD schemas, matching them dynamically by using namespace resolution The XSD files reside in a folder different from the folder holding the XML files</td></tr>
<tr><td>04_schema_resolution.robot</td><td>20_Validate_Using_Namespace_Matching_Same_folder</td><td>Validate XML files against XSD schemas, matching them dynamically by using namespace resolution The XSD files reside in the same folder as the XML files. Therefore we do not have to specify a seperate path to the XSD files upon calling the keyword</td></tr>
<tr><td>04_schema_resolution.robot</td><td>21_Validate_Using_Filename_Matching</td><td>Validate XML files against XSD schemas, matching them dynamically based on file name</td></tr>
<tr><td>04_schema_resolution.robot</td><td>22_Validate_With_No_File_Match</td><td>Validate XML files against XSD schemas (using namespace matching), where one XML file does not have a matching XSD counterpart</td></tr>
<tr><td>05_advanced_validation_1.robot</td><td>23_Validate_Batch_Single_XSD_Import</td><td>Validate multiple XML files against a single XSD file The XSD file is in a different folder from the XML files The XSD path is passed during library instantiation</td></tr>
<tr><td>05_advanced_validation_1.robot</td><td>24_Validate_Batch_Single_XSD_Keyword_Call</td><td>Validate multiple XML files against a single XSD file The XSD file is in a different folder from the XML files The XSD path is NOT passed during library instantiation, but with the keyword call</td></tr>
<tr><td>05_advanced_validation_1.robot</td><td>25_Validate_Batch_Single_XSD_By_Filename</td><td>Validate multiple XML files against multiple XSD file, dynamically matching XML/XSD files, based on the filename matching strategy The XSD file resides in the same folder as the XML files No XSD path is provided, but the keyword is called with: xsd_search_strategy=by_file_name</td></tr>
<tr><td>06_advanced_validation_2.robot</td><td>26_Validation_With_Init_Schema</td><td>Validates that the schema as passed during library import is correctly loaded Subsequently validates various XML files (located in a folder) against the loaded schema Finally, validates that the keyword has correctly identified, collected and reported (returned) all errors that are to be expected and that, moreover, the errors have also been written to a CSV file</td></tr>
<tr><td>06_advanced_validation_2.robot</td><td>27_Various_Ways_To_Load_Schemas_01</td><td>Optionally validates that the schema (as active at the end of the previous test case) is (still) correctly loaded Subsequently validates various XML files (located in a folder), passing a new schema file (located in a seperate/different folder) directly to the keyword (replacing the previously active schema) Since all XML files are actually valid, the only validation applied to the result of the action is to ensure that the new schema has, indeed, replaced the previously active schema Finally, a second set of XML files (located in yet another folder) is being validated, by passing the XML folder path as xsd_path to the keyword. This will load a schema file that is located in that folder, provided there is only one such schema file present Since all XML files are valid, it is then only validated that the new schema has successfully replaced the previous schema</td></tr>
<tr><td>06_advanced_validation_2.robot</td><td>28_Various_Ways_To_Load_Schemas_02</td><td>Optionally validates that the schema (as active at the end of the previous test case) is (still) correctly loaded Subsequently validates various XML files (located in a folder), without expicitly passing an xsd_path. Rather, the XML files are mapped to their respective XSD files (located in the same folder) dynamically, by file name matching. The latter is triggered by passing the ``xsd_search_strategy`` argument as 'by_filename' to the keyword, next to the XML folder path The results of the validation are subsequently thoroughly validated in terms of completeness and correctness Subsequently a second batch of XML files is validated in the same fashion. However, this time the XSD files reside in their own folder, different from the folder where the XML files are located Since all XML files are valid, only the correct setting schemas is validated</td></tr>
<tr><td>06_advanced_validation_2.robot</td><td>29_Various_Ways_To_Load_Schemas_03</td><td>Optionally validates that the schema (as active at the end of the previous test case) is (still) correctly loaded Subsequently validates various XML files (located in a folder), without expicitly passing an xsd_path. Rather, the XML files are mapped to their respective XSD files (located in the same folder) dynamically, by namespace matching. The latter is triggered by passing the ``xsd_search_strategy`` argument as 'by_name_space' to the keyword, next to the XML folder path In total, 21 invalid files will be reported as invalid, either because of (1) XSD violation, (2) malformedness or (3) because of not matching any XSD Of the 21 errors that the library will identify, collect and report, only three will be validated for correctness. since there have been plenty validations throughout the various integration test suites already. You can inspect the log to see the various XSD violations and other types of errors that the library reports Bascially, there are three XSD files and for each XSD file there are three XML files that violate the XSD and three XML files that do not violate the schema, but are malformed. The latter will be catched and reported by the library as well! Finally, there are three XML files that do not match with any of the three schema files and will therefore be reported as such, by the library</td></tr>
<tr><td>06_advanced_validation_2.robot</td><td>30_Error_Facets</td><td>This test case passes custom (non-default) error facets to the Validate Xml Files keywords Error facets determine which attributes of a parse error or an XmlSchema (validation) error are collected and reported by the keyword Error facets can also be passed during library import. Passing error facets to the keyword overrules these default facets. However, the next time the keyword ios called without passing error_facets, the default facets apply again The validations errors that are reported/returned in this test case will not be validated. Instead, each error is logged, including the data type of the error facet (e.g. a string or xml.etree.ElementTree.Element)</td></tr>
<tr><td>06_advanced_validation_2.robot</td><td>31_Validation_Passing_XSD_Path_With_Include</td><td>Validate multiple XML files against an XSD with an included XSD This ensures that XSD imports/includes are correctly handled The Validate Xml Keyword will validate three XML files against the loaded schema: - one file will be deemed valid - one file will be deemed invalid on account of violating the main XSD schema - one file will be deemed invalid on account of violating the included XSD schema</td></tr>
</table></body></html>