=========================================== openpyxl-redmine workflow integration tests =========================================== Overview -------- Workflow integration tests exercise the interaction of Table and Redmine representations of workflows using the openpyxl-redmine API. Of the four tests in src/tests/integration/ two are operational: * test_workflow_validate.py * test_workflow_groups.py Some additional tuning, e.g. a separate test Redmine project container, is required to make the tests usable without occasional manual intervention, e.g. to replace a inadvertently deleted start point Redmine workflow! integration test automation --------------------------- The PASSWORD environmental of the shell executing tests must be set to the API key. test_workflow_groups -------------------- The aim is to verify that workflow_validate correctly validates Table content by testing Tables containing errors. Test output: :: $ python -m unittest -v -f src/tests/integration/test_workflow_validate.py Caching Redmine Tasks - Wait! Redmine Caching Finished - 151 Tasks Testing validate_defined_name.xlsx ERROR spreadsheet is missing defined name: Service Testing validate_empty_cells.xlsx row 2 col Subject ERROR cannot be empty row 3 col Type ERROR cannot be empty row 4 col LinkName ERROR cannot be empty row 8 col Delay ERROR cannot be empty row 5 col Days ERROR cannot be empty Testing validate_bad_splits.xlsx row 8 ERROR split() cannot differ ['TargetLinkName', 'Relationship', 'Delay'] ['ln6', None, '40'] row 12 ERROR split() cannot differ ['TargetLinkName', 'Relationship', 'Delay'] [['ln2', 'ln10'], ['follows'], ['0', '15']] row 20 ERROR split() cannot differ ['TargetLinkName', 'Relationship', 'Delay'] [['ln8'], ['follows', 'follows'], ['0', '0']] row 24 ERROR split() cannot differ ['TargetLinkName', 'Relationship', 'Delay'] [None, 'follows', '0'] Testing validate_not_unique.xlsx row 5 col LinkName ERROR not unique ln4 found 4 row 6 col LinkName ERROR not unique ln4 found 4 row 10 col LinkName ERROR not unique ln4 found 4 row 33 col LinkName ERROR not unique ln4 found 4 Testing validate_split_isin.xlsx row 15 col TargetLinkName ERROR no matching LinkName nono_1 row 20 col TargetLinkName ERROR no matching LinkName nono_2 Testing validate_split_isin_relationship.xlsx row 15 col Relationship ERROR no matching Relationship rubbish row 20 col Relationship ERROR no matching Relationship rubbish Testing validate_split_isin_type.xlsx row 19 col Type ERROR no matching Type Rubbish Testing validate_ge.xlsx row 11 col Days ERROR not >= 1 Testing validate_split_ge.xlsx row 12 col Delay ERROR not >= 0 row 14 col Delay ERROR not >= 0 Testing validate_bad_ticket.xlsx row 8 col Ticket ERROR ticket is stale 1000000 Testing validate_curly_quotes.xlsx row 3 col Subject ERROR string not ascii : ERD for device “ACME PRODUCT” row 4 col Subject ERROR string not ascii : Setup “board” of stakeholders "ACME PRODUCT" device row 6 col Subject ERROR string not ascii : Requester acceptance of “demonstrator test of ACME PRODUCT row 7 col Subject ERROR string not ascii : Control concept “ACME” PRODUCT “Board” “of” stakeholders OK Testing validate_balanced_quotes.xlsx row 3 col Subject ERROR inserts ['"', '"'] not pair balanced 0: ERD for device "ACME PRODUCT [15] row 4 col Subject ERROR inserts ['"', '"'] not pair balanced 0: bla test ACME PRODUCT" [21] row 15 col Subject ERROR inserts ['"', '"'] not pair balanced 0: Abc 123" xyz [7] Testing validate_anchor_quotes.xlsx row 2 col Subject ERROR insert markers ['"', '"'] missed in Anchor 0: Add control support for ACME PRODUCT devices [] Testing validate_person.xlsx Testing validate_no_errors.xlsx tearDown executed ok ---------------------------------------------------------------------- Ran 1 test in 5.590s OK test_workflow_groups -------------------- The aim is to verifying Table and Redmine workflow representation compatibility by creating and comparing Redmine representations duplicate from an initial Redmine representation via its Table representation by executing the following steps: * extracts from a Redmine workflow its Table representation * validates the Table created * injects the Table into Redmine * compares the original Redmine workflow with the newly injected one Test output: :: $ python -m unittest -v -f src/tests/integration/test_workflow_groups.py test_workflow (src.tests.integration.test_workflow_groups.WorkflowDaysTest) ... setUp executed test Workflow instantiation Caching Redmine Tasks - Wait! Redmine Caching Finished - 126 Tasks test target workflow exists test workflow_extract test workflow_validate test workflow_inject extend table create_table_issues created row Redmine issue 1 88204 created row Redmine issue 2 88205 ... created row Redmine issue 24 88227 created row Redmine issue 25 88228 create_table_relationships create relationship 88207 88206 follows 0.0 exception, press ahead ... create relationship 88228 88227 follows 0.0 exception, press ahead injected worklflow id 88204 test Workflow re-instantiation, slim update Caching Redmine Tasks - Wait! Redmine Caching Finished - 151 Tasks test workflow_compare Passed id1 and id2 are both workflow anchors 88089 workflow view: [(88089, 1), (88090, 0), (88091, 0), (88092, 0), (88093, 0), (88094, 2)... 88204 workflow view: [(88204, 1), (88205, 0), (88206, 0), (88207, 0), (88208, 0), (88209, 2)... Passed id1 and id2 tree graphs are same working ......................... Passed id1 and id2 workflows have same task relationship counts Passed id1 and id2 workflow tasks have same duractions Workflows are compatible! 88089 88204 tearDown executed ok ---------------------------------------------------------------------- Ran 1 test in 72.525s OK