Error in receiving email from a scheduled test (bug)

8 posts, 0 answers
  1. Efficio
    Efficio avatar
    11 posts
    Member since:
    Jun 2019

    Posted 11 Oct Link to this post

    I just started testing the email notification functionality of the test server, and I am having an issue with at least one of my test lists.  I know at least one of my other test lists doesn't have this issue so it isn't a general issue and may be specific to one of the tests in the list.

    I don't actually have the XML file export enabled here, just HTML.  So it should only be dealing with the email body and the HTML.  Could there be something with text encoding where a test step description has a character that is allowed in the interface but isn't allowed in the export?

     

    The log from the execution server is this.

    [10/11 16:02:51,Telerik.TestStudio.ExecutionManagerService.exe(12852:15),Execution] PostListExecutionEmailer.OnAfterTestListCompleted() : Attempting to send email for job 38f7e14c-0301-4e1f-b974-4e10c21dcdd3
    [10/11 16:02:52,Telerik.TestStudio.ExecutionManagerService.exe(12852:15),Error] XmlFileHandler`1.Export() : EXCEPTION! (see below)
         Situation: Error saving file in XML format.
         Outer Exception Type: System.ArgumentException
         Message: '', hexadecimal value 0x1B, is an invalid character.
         HRESULT: 0x80070057 (Official ID (if app.) = E_INVALIDARG, Error Bit = FAILED, Facility = FACILITY_WIN32, Code = ERROR_INVALID_PARAMETER)
         Call Stack:
              at System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(Int32 ch, Byte* pDst, Boolean entitize)
              at System.Xml.XmlUtf8RawTextWriter.WriteElementTextBlock(Char* pSrc, Char* pSrcEnd)
              at System.Xml.XmlUtf8RawTextWriter.WriteString(String text)
              at System.Xml.XmlUtf8RawTextWriterIndent.WriteString(String text)
              at System.Xml.XmlRawWriter.WriteValue(String value)
              at System.Xml.XmlWellFormedWriter.WriteValue(String value)
              at ArtOfTest.Common.Design.XmlFileHandler`1.Export(String filePath, Dictionary`2 objectsWithPaths)

    [10/11 16:02:52,Telerik.TestStudio.ExecutionManagerService.exe(12852:15),Error] RunResultHtmlExporter.Export() : EXCEPTION! (see below)
         Outer Exception Type: System.ArgumentNullException
         Message: Value cannot be null.
              Parameter name: path
         HRESULT: 0x80004003 (Official ID (if app.) = E_POINTER, Error Bit = FAILED, Facility = FACILITY_NULL, Code = 16387)
         Call Stack:
              at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
              at System.IO.StreamReader..ctor(String path)
              at ArtOfTest.WebAii.Design.Execution.RunResultHtmlExporter.BuildTempHtml(String filePath, String xmlFilePath)
              at ArtOfTest.WebAii.Design.Execution.RunResultHtmlExporter.Export(String filePath, Dictionary`2 resultsWithPaths)

    [10/11 16:02:52,Telerik.TestStudio.ExecutionManagerService.exe(12852:15),Execution] <>c__DisplayClass5_1.<JobFinished>b__3() : EXCEPTION! (see below)
         Situation: Exception in jobfinished plugin executionStatus
         Outer Exception Type: System.ArgumentNullException
         Message: Value cannot be null.
              Parameter name: fileName
         HRESULT: 0x80004003 (Official ID (if app.) = E_POINTER, Error Bit = FAILED, Facility = FACILITY_NULL, Code = 16387)
         Call Stack:
              at System.Net.Mail.AttachmentBase.SetContentFromFile(String fileName, String mediaType)
              at System.Net.Mail.AttachmentBase..ctor(String fileName)
              at System.Net.Mail.Attachment..ctor(String fileName)
              at Telerik.TestStudio.ExecutionManager.Notifications.Emailer.Mail.ResultMailSender.AddAttachment(String fileName)
              at Telerik.TestStudio.ExecutionManager.Notifications.Emailer.Mail.ResultMailSender.SetRunResultAttachment(RunResult runResult, NotificationSettings settings)
              at Telerik.TestStudio.ExecutionManager.Notifications.Emailer.PostListExecutionEmailer.OnAfterTestListCompleted(TestListExecutionStatus executionStatus, RunResult result)
              at Telerik.TestStudio.ExecutionManager.Notifications.ExecutionManagerNotificationService.<>c__DisplayClass5_1.<JobFinished>b__3(ITestListExecutionExtensionStatus extensionStatus)

  2. Efficio
    Efficio avatar
    11 posts
    Member since:
    Jun 2019

    Posted 11 Oct in reply to Efficio Link to this post

    I believe the tests in this test list cause the failure.
  3. Plamen Mitrev
    Admin
    Plamen Mitrev avatar
    157 posts

    Posted 14 Oct Link to this post

    Hello,

    I want to share some additional details about the export to HTML process and what actually happens. Initially we store the results in the Results folder as an .aiiresult file. The next step is to convert it internally to XML and then convert that to HTML. It seems that there is some special character that is causing issues with the XML format and the whole process fails.

    I will need your help to continue investigating this issue and find out what is causing it, since I am not able to execute the provided tests. Could you, please, attach the .aiiresult file from a test list that is causing this issue and the full application log from the execution server? I will analyze them and debug this misbehavior in more details, before getting back to you.

    Thank you for your cooperation in advance. 

    Regards,
    Plamen Mitrev
    Progress Telerik

     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  4. Efficio
    Efficio avatar
    11 posts
    Member since:
    Jun 2019

    Posted 14 Oct in reply to Plamen Mitrev Link to this post

    I believe the actual character causing the issue is the escape character.  I'm not seeing anything obvious in my test steps (ex. the recording of an escape keypress) that might explain this.

    Where exactly are the aiiresult files stored?  I see the results folder (C:\Efficio\TelerikTestStudio\Efficio Main Application\Results), but the most recently modified file there is from 10/10.  In order to even get the email notification functionality I had to switch from using the internal schedule/execution server to the components which I installed around that time.  Are the results now being stored somewhere else?  Are they now stored in the storage server (database) instead?

    I'm going to send you the last aiiresult file I see for this test list since it might be useful and the tests are the same now, however, it is from before I started configuring the email notification which is what is causing the failure (or least I'm just now noticing this failure in the log and it is preventing the email from being sent).

  5. Plamen Mitrev
    Admin
    Plamen Mitrev avatar
    157 posts

    Posted 15 Oct Link to this post

    Hi,

    The test lists that scheduled for remote execution are stored in the storage server, while the ones executed with Run List are stored in the Results folder under your project. This is only a side note clarification to your observation about the missing results in your local project and I hope it is helpful.

    I managed to reproduce the same issue, while exporting the attached results to HTML. After further investigation, it looks like there is unicode character code "\u001b" for ESCAPE button in the description of step 4 in test "Add activity from Activity Detail page". It is not visible in Test Studio, but it was somehow recorded in the .tstest file. What I did was, manually remove this character code from 3 places in the .tstest file (using notepad++) and I have attached it to my reply. Please try to run the test and export the results to HTML. 

    I am not sure how this character was recorded in the test step and I will be glad to look into it. Please help me understand how to reproduce this issue and share all relevant information that you can think of. For example, which browser are you using for recording, against what kind of control and what is the step by step process to try and reproduce it. Also, is it possible for me to have access to the application under test, if you manage to reproduce the issue, so I can troubleshoot it further.

    Thank you for your cooperation and understanding in this discussion.

    Regards,
    Plamen Mitrev
    Progress Telerik

     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  6. Efficio
    Efficio avatar
    11 posts
    Member since:
    Jun 2019

    Posted 15 Oct in reply to Plamen Mitrev Link to this post

    I am using IE to record tests.

    This is what is in the .tstest file for that step.  "Description": "RadComboBox('ActivityAdvertiserComboBox'): text 'air\u001b' entered in combobox input"

    The control is our custom control which inherits from RadComboBox. It does loading on demand to provide search results. I wouldn't think any of our custom functionality would cause this behavior.  It may be that I entered the text 'air' and hit escape to close the drop down.  This was one of my early tests when evaluating the product so I was trying different things.

    I doubt you will need to go so far as to access our application even if you can't reproduce it as I assume the workaround provided will resolve my immediate need.  You should maybe look into filtering certain characters in Test Studio to prevent this.

  7. Efficio
    Efficio avatar
    11 posts
    Member since:
    Jun 2019

    Posted 15 Oct in reply to Plamen Mitrev Link to this post

    Interestingly, I also made the change to remove the character in all 3 places in the tstest file, but it didn't work for me (even after restarting Test Studio).  However, when I replaced my files with yours it now works.

    I messed around a bit trying to reproduce it but was unable to.  It doesn't include the escape in the text.  This is clearly something that can happen, but it is apparently rare.  It may even be fixed in the most recent version.  I created these tests around a month ago.

    I consider this resolved on my end.

  8. Plamen Mitrev
    Admin
    Plamen Mitrev avatar
    157 posts

    Posted 16 Oct Link to this post

    Hello,

    I tried to reproduce the misbehavior on my end the other day. I assumed that you have pressed Escape key right after entering text and that it was only recorded in the test step's description, which would be a bug. Since I was not able to reproduce it and you can't do it as well, we will keep an eye out for such issues.

    We try filter the characters that we found causing troubles and we will be happy to improve those filters, if we manage to reproduce and analyze the misbehavior.

    Thank you for updating the thread with your feedback and current status of the issue. Please do not hesitate to contact us, if you need any help or have more details.

    Regards,
    Plamen Mitrev
    Progress Telerik

     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top