Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UnitTest Failures #3100

Closed
12 tasks done
stefanhaerter opened this issue Mar 4, 2024 · 40 comments
Closed
12 tasks done

Fix UnitTest Failures #3100

stefanhaerter opened this issue Mar 4, 2024 · 40 comments
Labels
bug Something isn't working as intended unittests Requests wrt unittests
Milestone

Comments

@stefanhaerter
Copy link
Contributor

stefanhaerter commented Mar 4, 2024

  • EditFieldRender
  • Escalations
  • AgentTicketFreeText
  • CustomerTicketZoom-related
  • AgentTicketBulk(ACL)
  • AgentTicketForward(Draft)
  • AgentTicketEmailOutbound
  • AgentTicketEmailPGP
  • AgentTicketEmail(Draft)
  • Agent/InlineTicketImages
  • ProcessManagement/Bug12179
  • Admin/TicketAppointments
@stefanhaerter stefanhaerter added bug Something isn't working as intended unittests Requests wrt unittests labels Mar 4, 2024
@stefanhaerter stefanhaerter added this to the OTOBO 11.0 milestone Mar 4, 2024
stefanhaerter added a commit that referenced this issue Mar 6, 2024
Removed errantly added FieldNames param from FormUpdate.
svenoe pushed a commit that referenced this issue Mar 6, 2024
Removed errantly added FieldNames param from FormUpdate.
@bschmalhofer
Copy link
Contributor

Things look better now. Here is the result of the latest run, with "local in Eventhandler commented out":

Test Summary Report

/opt/otobo/scripts/test/Compile.t (Wstat: 0 Tests: 1775 Failed: 0)
TODO passed: 695, 825
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketActionCommon/AgentTicketFreeText.t (Wstat: 2304 (exited 9) Tests: 64 Failed: 9)
Failed tests: 38, 40, 43, 46, 48, 50, 52, 54, 56
Non-zero exit status: 9
/opt/otobo/scripts/test/Selenium/TestingMethods.t (Wstat: 0 Tests: 36 Failed: 0)
TODO passed: 21, 24, 28
Files=968, Tests=81640, 4046 wallclock secs (15.99 usr 2.16 sys + 1093.35 cusr 102.84 csys = 1214.34 CPU)
Result: FAIL

@stefanhaerter
Copy link
Contributor Author

stefanhaerter commented Mar 7, 2024

Thank you very much =)
scripts/test/Selenium/Agent/AgentTicketActionCommon/AgentTicketFreeText.t has a known issue, most likely related to focus handling and my recent FormUpdate changes. I will investigate it as soon as I have the time.
The fact that the tests scripts/test/Event/Escalations.t, scripts/test/ProcessManagement/Bug12179.t and scripts/test/Selenium/Agent/Admin/TicketAppointments.t do not fail indicates that they are somehow related to the EventHandler changes, I guess.

@bschmalhofer
Copy link
Contributor

bschmalhofer commented Mar 9, 2024

The latest test run with EventHandler.pm as checked in:

Test Summary Report

/opt/otobo/scripts/test/Compile.t (Wstat: 0 Tests: 1779 Failed: 0)
TODO passed: 697, 827
/opt/otobo/scripts/test/EmailParser/MultipartMixed.t (Wstat: 256 (exited 1) Tests: 8 Failed: 1)
Failed test: 8
Non-zero exit status: 1
/opt/otobo/scripts/test/HTMLUtils/DocumentComplete.t (Wstat: 256 (exited 1) Tests: 2 Failed: 1)
Failed test: 1
Non-zero exit status: 1
/opt/otobo/scripts/test/Layout/RichTextDocumentComplete.t (Wstat: 1024 (exited 4) Tests: 4 Failed: 4)
Failed tests: 1-4
Non-zero exit status: 4
/opt/otobo/scripts/test/Selenium/Agent/Admin/AdminGenericInterfaceMappingXSLT.t (Wstat: 256 (exited 1) Tests: 39 Failed: 1)
Failed test: 39
Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketActionCommon/AgentTicketNote.t (Wstat: 256 (exited 1) Tests: 80 Failed: 1)
Failed test: 80
Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketForward.t (Wstat: 256 (exited 1) Tests: 55 Failed: 1)
Failed test: 55
Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketProcessAttachment.t (Wstat: 256 (exited 1) Tests: 27 Failed: 1)
Failed test: 27
Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketSplitInlineImage.t (Wstat: 256 (exited 1) Tests: 17 Failed: 1)
Failed test: 17
Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Agent/CKEditor.t (Wstat: 256 (exited 1) Tests: 7 Failed: 1)
Failed test: 7
Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Agent/FormDraft/AgentTicketActionCommonDraft.t (Wstat: 256 (exited 1) Tests: 15 Failed: 1)
Failed test: 15
Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Agent/MarkTicketSeenUnseenZoom.t (Wstat: 256 (exited 1) Tests: 28 Failed: 1)
Failed test: 11
Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Customer/DynamicFields/DynamicFieldDatabase.t (Wstat: 256 (exited 1) Tests: 138 Failed: 1)
Failed test: 138
Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/TestingMethods.t (Wstat: 0 Tests: 36 Failed: 0)
TODO passed: 21, 24, 28
/opt/otobo/scripts/test/TemplateGenerator/AutoResponse.t (Wstat: 768 (exited 3) Tests: 31 Failed: 3)
Failed tests: 11, 14, 17
Non-zero exit status: 3
Files=969, Tests=80863, 7724 wallclock secs (14.75 usr 2.07 sys + 4449.71 cusr 98.85 csys = 4565.38 CPU)
Result: FAIL
ran tests for product OTOBO 11.0.x on host a575e9acd54c .

@stefanhaerter
Copy link
Contributor Author

This looks very similar to the failures I got when running the CKEditor 5 branch. Since this branch is merged, the failures seem to be related to CKEditor 5 changes.

@bschmalhofer
Copy link
Contributor

Here is the latest run. I think that the failures are not surprising, but the run time is. It was over 3h.

created: 2024-03-21 12:45:16.067293436 +0000
modified: 2024-03-21 15:52:15.380928367 +0000

My suspicion is that strange things happen in global desctruction.

Test Summary Report
-------------------
/opt/otobo/scripts/test/Compile.t                                                                         (Wstat: 0 Tests: 1775 Failed: 0)
  TODO passed:   712, 842
/opt/otobo/scripts/test/Config/Defaults.t                                                                 (Wstat: 512 (exited 2) Tests: 114 Failed: 2)
  Failed tests:  58-59
  Non-zero exit status: 2
/opt/otobo/scripts/test/DynamicField/EditFieldValueGet.t                                                  (Wstat: 256 (exited 1) Tests: 196 Failed: 1)
  Failed test:  196
  Non-zero exit status: 1
/opt/otobo/scripts/test/GenericInterface/Operation/Ticket/TicketGet.t                                     (Wstat: 3328 (exited 13) Tests: 62 Failed: 13)
  Failed tests:  34-42, 44, 46-48
  Non-zero exit status: 13
/opt/otobo/scripts/test/HTMLUtils/DocumentCleanup.t                                                       (Wstat: 512 (exited 2) Tests: 17 Failed: 2)
  Failed tests:  13-14
  Non-zero exit status: 2
/opt/otobo/scripts/test/Selenium/Agent/Admin/AdminGenericInterfaceMappingXSLT.t                           (Wstat: 256 (exited 1) Tests: 39 Failed: 1)
  Failed test:  39
  Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Agent/Admin/AdminSort.t                                                  (Wstat: 512 (exited 2) Tests: 42 Failed: 2)
  Failed tests:  41-42
  Non-zero exit status: 2
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketActionCommon/AgentTicketNote.t                          (Wstat: 256 (exited 1) Tests: 80 Failed: 1)
  Failed test:  80
  Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketActionCommon/AgentTicketOwner.t                         (Wstat: 512 (exited 2) Tests: 43 Failed: 2)
  Failed tests:  42-43
  Non-zero exit status: 2
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketBulk.t                                                  (Wstat: 768 (exited 3) Tests: 95 Failed: 3)
  Failed tests:  87, 93, 95
  Non-zero exit status: 3
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketForward.t                                               (Wstat: 256 (exited 1) Tests: 55 Failed: 1)
  Failed test:  55
  Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketProcessAttachment.t                                     (Wstat: 256 (exited 1) Tests: 27 Failed: 1)
  Failed test:  27
  Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketSplitInlineImage.t                                      (Wstat: 256 (exited 1) Tests: 17 Failed: 1)
  Failed test:  17
  Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Agent/CKEditor.t                                                         (Wstat: 256 (exited 1) Tests: 7 Failed: 1)
  Failed test:  7
  Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Agent/FormDraft/AgentTicketActionCommonDraft.t                           (Wstat: 256 (exited 1) Tests: 15 Failed: 1)
  Failed test:  15
  Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Agent/MarkTicketSeenUnseenZoom.t                                         (Wstat: 256 (exited 1) Tests: 28 Failed: 1)
  Failed test:  11
  Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Output/TicketZoom/ProcessInformation.t                                   (Wstat: 256 (exited 1) Tests: 15 Failed: 1)
  Failed test:  15
  Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/TestingMethods.t                                                         (Wstat: 0 Tests: 36 Failed: 0)
  TODO passed:   21, 24, 28
/opt/otobo/scripts/test/SysConfig/ConfigurationTranslatedGet.t                                            (Wstat: 256 (exited 1) Tests: 6 Failed: 1)
  Failed test:  6
  Non-zero exit status: 1
/opt/otobo/scripts/test/TemplateGenerator/Replace.t                                                       (Wstat: 256 (exited 1) Tests: 76 Failed: 1)
  Failed test:  48
  Non-zero exit status: 1
Files=969, Tests=80622, 11219 wallclock secs (14.93 usr  2.18 sys + 4685.27 cusr 101.42 csys = 4803.80 CPU)
Result: FAIL
ran tests for product OTOBO 11.0.x on host 941a95c5995c .

@stefanhaerter
Copy link
Contributor Author

stefanhaerter commented Mar 21, 2024

I would consider a runtime of about 1.5 to 2 hours normal, based on my experience upon now - 3 hours is a bit of an outlier, indeed.

@stefanhaerter
Copy link
Contributor Author

EditFieldRender should be fixed with merging #3466. Had a quick discussion with Sven about AgentTicketActionCommonDraft. I will precisely check this and if there is no further meaning in checking for a dialog, I will just remove the check as the label turning red and the error tooltip popping up is the correct behavior if no server error occured.

stefanhaerter added a commit that referenced this issue Jun 13, 2024
Added focus handling.
Removed duplicated 'Set back' test.
stefanhaerter added a commit that referenced this issue Jun 13, 2024
stefanhaerter added a commit that referenced this issue Jun 13, 2024
We do not expect an error dialog due to js validation failing before.
@stefanhaerter
Copy link
Contributor Author

Taking the changes of #3487 and #3489 into account, failures should be down to only one, which is AgentTicketOwner. I'm yet unsure what this failure indicates, as I found that clicking on the selection filter checkbox in the UI applies the filter and triggering a click event via js / Selenium does not, but I have not yet found the reason behind this. So it is possible that this indicates a real bug.

bschmalhofer pushed a commit that referenced this issue Jun 13, 2024
Added focus handling.
Removed duplicated 'Set back' test.
bschmalhofer pushed a commit that referenced this issue Jun 13, 2024
bschmalhofer pushed a commit that referenced this issue Jun 13, 2024
We do not expect an error dialog due to js validation failing before.
@bschmalhofer
Copy link
Contributor

The latest run looks pretty good. The failure in AgentTicketZoom.t could be related to the recent change 61ef164 .

Test Summary Report

/opt/otobo/scripts/test/Compile.t (Wstat: 0 Tests: 1776 Failed: 0)
TODO passed: 710, 840
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketActionCommon/AgentTicketOwner.t (Wstat: 512 (exited 2) Tests: 44 Failed: 2)
Failed tests: 43-44
Non-zero exit status: 2
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketZoom.t (Wstat: 256 (exited 1) Tests: 70 Failed: 1)
Failed test: 70
Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/TestingMethods.t (Wstat: 0 Tests: 36 Failed: 0)
TODO passed: 21, 24, 28
Files=969, Tests=81551, 3857 wallclock secs (16.09 usr 2.10 sys + 728.71 cusr 108.82 csys = 855.72 CPU)
Result: FAIL
ran tests for product OTOBO 11.0.x on host 496d03bc0bee .

@bschmalhofer
Copy link
Contributor

Run just before the release of OTOBO 11.0.3. The failure in _ConfiguredRepositoryDefinitionGet.t _ is already fixed.

Test Summary Report

/opt/otobo/scripts/test/Compile.t (Wstat: 0 Tests: 1758 Failed: 0)
TODO passed: 710, 840
/opt/otobo/scripts/test/Package/ConfiguredRepositoryDefinitionGet.t (Wstat: 256 (exited 1) Tests: 2 Failed: 1)
Failed test: 2
Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketActionCommon/AgentTicketOwner.t (Wstat: 512 (exited 2) Tests: 44 Failed: 2)
Failed tests: 43-44
Non-zero exit status: 2
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketZoom.t (Wstat: 256 (exited 1) Tests: 70 Failed: 1)
Failed test: 70
Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/TestingMethods.t (Wstat: 0 Tests: 36 Failed: 0)
TODO passed: 21, 24, 28
Files=969, Tests=81533, 3788 wallclock secs (15.43 usr 2.02 sys + 720.33 cusr 108.66 csys = 846.44 CPU)
Result: FAIL
ran tests for product OTOBO 11.0.x on host 419ac9b562f3 .

@bschmalhofer
Copy link
Contributor

First run on rel-11_1 looks good, with the expected two failing test scripts:

Test Summary Report

/opt/otobo/scripts/test/Compile.t (Wstat: 0 Tests: 1757 Failed: 0)
TODO passed: 709, 839
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketActionCommon/AgentTicketOwner.t (Wstat: 512 (exited 2) Tests: 44 Failed: 2)
Failed tests: 43-44
Non-zero exit status: 2
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketZoom.t (Wstat: 256 (exited 1) Tests: 70 Failed: 1)
Failed test: 70
Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/TestingMethods.t (Wstat: 0 Tests: 36 Failed: 0)
TODO passed: 21, 24, 28
Files=969, Tests=81529, 3839 wallclock secs (15.85 usr 2.30 sys + 727.57 cusr 107.00 csys = 852.72 CPU)
Result: FAIL
ran tests for product OTOBO 11.1.x on host 5f75124b367d .

bschmalhofer added a commit that referenced this issue Jun 28, 2024
and add some more code comments.
But the test failure persists.
bschmalhofer added a commit that referenced this issue Jun 28, 2024
and add some more code comments.
But the test failure persists.
@bschmalhofer
Copy link
Contributor

I tried to understand the test failure in scripts/test/Selenium/Agent/AgentTicketActionCommon/AgentTicketOwner.t . But to no avail. The event that should filter the user list seems to be registered in

RegisterFilterEvent($SelectObj, $InputContainerObj, $ToolbarContainerObj, $FilterObj, 'Filter');
. But the input list is not updated in the remote controlled browser. This might be an indication that something fishy is going on.

The selection seems to work fine when executed manually in a browser.

@stefanhaerter
Copy link
Contributor Author

I guess that this is due to some event being executed on key(down|press|up), but couldn't manage to find out which one and where.

@bschmalhofer
Copy link
Contributor

bschmalhofer commented Jun 28, 2024

In the code I have seen registrations for change.InputField, which I assumed to be changes in the checked status of the checkboxes. The check status does change, but I see no effect in the list of selectable agents.

@stefanhaerter
Copy link
Contributor Author

To me, it looks a lot like the failures in AgentTicketZoom and AgentTicketOwner are due to the same issue. Should we shift this into a separate issue?

@bschmalhofer
Copy link
Contributor

@stefanhaerter Yes, please do so.

@bschmalhofer
Copy link
Contributor

Closing this issue as there now is a dedicated issue #3563 for the remaining two failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended unittests Requests wrt unittests
Projects
None yet
Development

No branches or pull requests

2 participants