Email notification not generating

11 posts, 0 answers
  1. Padmashree
    Padmashree avatar
    24 posts
    Member since:
    May 2018

    Posted 07 Mar Link to this post

    Hello,

     

    I have setup smtp email configuration on schedule server and selected option to send email while scheduling test execution.

    Test executes just fine but not receiving email. Email smtp config and log file attached.

    I also need to send test results via email when test is run through .bat file

    my bat file

    Title Test Runner
    IF EXIST "C:\Program Files (x86)\Progress\Test Studio\Bin" goto :a
    echo not found
    pause
    exit
    :a
    setlocal
    path=C:\Program Files (x86)\Telerik\Test Studio\Bin;%path%
    call ArtOfTest.Runner.exe list="C:\..\TestLists\Remote Execution Test.aiilist" serverPublish=true notifyOption=1 mails=myemail@abc.org

     

    Thanks

    -

    Padmashree

     

     


     

     

     

     

     

  2. Daniel Djambov
    Admin
    Daniel Djambov avatar
    84 posts

    Posted 12 Mar Link to this post

    Hi Padmashree,

    Thank you for sending us details about your case. From what I see in scheduling configuration screen shot (smtpemail), you have setup properly mail server for sending mails. The execution log that you sent is empty for some reason.

    Now, if I understand you correctly, you trigger a Test List run and did not receive any mail - is that correct?

    If yes, can you please tell me if you have setup your project for remote execution according to this article? If you have, next step is to trigger a Scheduled Run, in which to configure send mail options according to this instruction. No mail will be sent if you Run List locally, not from Schedule TestList option.

    If you have done this also, but no mail is received, I'm gonna need the Application Log during the scheduled run, from the machine on which the Scheduling Service is running - there should be information in the log when trying to send mail and possible error or exception for us to see.


    About your second question, that you want to send mails when running from a .bat file, the way you run the list from ArtOfTest.Runner.exe will not send any emails, because it is performs a local run, and for mails to be sent it should be a remote scheduled run. What you can use instead is the "Telerik.TestStudio.CommandLineClient.exe". located also in same installation folder as ArtOfTestRunner, with which you can trigger a scheduled run and set option to send mail.

    Please let me know if the above information was helpful. In case you are still not able to receive mails or configure command line runner, let me know with additional details to work on resolving your case.

    Best Regards,
    Daniel Djambov
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Padmashree
    Padmashree avatar
    24 posts
    Member since:
    May 2018

    Posted 12 Mar in reply to Daniel Djambov Link to this post

    Thanks Daniel for your response
    I tried scheduling test list execution with email notification option selected. Test List is executing fine but no email notification. I have attached log file .
    As per your suggestion tried with 'Telerik.TestStudio.CommandLineClient.exe' command like below but getting error even before starting to execute test.

    call Telerik.TestStudio.CommandLineClient -l "C:\TASB\TFS\Test Automation\Enterprise Smoke Test Suite\TestLists\Remote Execution Test.aiilist"  -u http://VM1.ms.tasb.org:8009/ -e myemail@tasb.org

     

    Both logs are attached.

    Thanks for your help.

    -

    Padmashree

     

  4. Padmashree
    Padmashree avatar
    24 posts
    Member since:
    May 2018

    Posted 12 Mar in reply to Padmashree Link to this post

    Oops attached wrong log file. Please find attached correct file.

    Thanks

  5. Padmashree
    Padmashree avatar
    24 posts
    Member since:
    May 2018

    Posted 12 Mar in reply to Padmashree Link to this post

    For some reason got error on file attachment . trying again
  6. Padmashree
    Padmashree avatar
    24 posts
    Member since:
    May 2018

    Posted 13 Mar in reply to Padmashree Link to this post

    Was getting error on file attachment. Hopefully this time it will work.

  7. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    1051 posts

    Posted 15 Mar Link to this post

    Hi Padmashree,

    Thanks for all details shared so far. Let me, please, step in this discussion as we have recently discussed the scheduling setup on your end and this is somewhat related to the configuration. 

    As a first step. there is something to sort out for the automatic email notifications - this setting is available out of the box when executing test lists through the scheduling service. The Scheduling command line runner, which mu colleague Daniel had suggested, will allow you to use the mentioned configuration and send emails with some additional adjustments (listed below). However, if you intend to use the local command line runner, which is called ArtOfTest.Runner.exe, this email configuration will not be available. 

    Please, find below the necessary information to continue adjusting the test list execution on your end. 

    SMTP Settings 
    As a next step in this conversation I will describe the necessary settings for the email notifications. You seemed to have set already the required details for the SMTP server in the Scheduling configuration wizard (please refer to the screenshot you have attached in the initial post). However, I suspect that the port listed there will not work with the current details. What I mean is that you have checked the 'SSL' checkbox and thus the appropriate port should be 456. Can you please verify with the responsible team on your end which should be the correct port to use to connect to the SMTP server and set that one accordingly in the Scheduling wizard? 

    Once the SMTP settings are correct as per the server requirements, you can apply the new settings by clicking on the 'Apply' button. To ensure that the this works, please schedule any sample test list through the Test Studio UI and enable the email notification. Please, generate the application log during that run so that you can provide it in case further investigation will be required. To collect meaningful records in the log, please clear this prior scheduling the sample test list. Then collect the file after it is finished and the result is populated in the Results tab in Test Studio. 

    Executing test list from the Scheduling Command line runner 
    If this works as expected, we can move to the next step - executing a test list via the scheduling command line runner. As you have collected a log file already for this type of execution, there are few things I noticed and need to be mentioned. It seems that your project is under source control in TFS - please, correct me if this assumption is incorrect. 

    However, if this is correct, there is a specific, which you are probably not aware of, but is important for the current setup. In the case when the project is TFS source controlled and test lists are executed via the Scheduling command line runner, the project will be automatically downloaded from the TFS. The respective setting when a test list is scheduled from the UI is to enable the 'Get Latest from TFS' option. 

    The reason to mention the above notes, is that probably the user under which runs the configured Scheduling service does not have access to the TFS. This user should be the one logged on the machine, which hosts the Scheduling service. To allow that service to access the TFS, you can change the account it will run under - this is described in details here. The account to use is the one which can login successfully to the TFS. 

    When this is set correctly, you can verify if that works when starting an elevated command prompt and then execute a sample test list as described in the help article. Please, generate the application log for this run as well, to collect and provide it for further analysis if this turns out to be necessary. 

    Sending Email from the Results tab 
    As a final note I will address what you mentioned about sending an email with the results from the Results tab in Test Studio. Can you, please, elaborate more on that one?
    - Do you see an email to be generated with the selected type of result format attached? 
    - If no, can you please generate the application log during the attempt to generate the email and send it for reference?
    - If yes, please, let me know, if you have changed the default Telerik email address listed in the From field of the generated email? This needs to be changed to the email account configured on that machine. Will an email be sent, if you change this to use the correct email user? 

    I do understand the above information is quite extensive and may rise additional questions, so please, if I have missed anything, do not hesitate to get back to me and place your queries. Still, I hope this will be useful for you and will help you adjust the remaining settings to continue using the scheduling feature in Test Studio. 

    Thank you in advance for your cooperation. I will be looking forward to hearing back from you. 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  8. Padmashree
    Padmashree avatar
    24 posts
    Member since:
    May 2018

    Posted 25 Mar in reply to Elena Tsvetkova Link to this post

    Hi Elena

    Sorry for delay in responding . I was out of the office.

    I tried with changing port to 456 and scheduling the Test List run. Now email is getting generated  but failing send email. The error appears to be a permissions error that cannot send the email on my behalf.

    My question is  , who is the actual sender of the email that is trying to send using email address configured in SMTP?

     

    Attached failed email notification

     

    Thanks,

    -

    Padmashree

     

     

     

  9. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    1051 posts

    Posted 27 Mar Link to this post

    Hi Padmashree, 

    Thank you for getting back to me. 

    Can you please provide some insights how that email was generated? Did you generate this from the Results tab to export an already existing result or it was automatically generated after a test list execution

    The above details is actually essential as the two approaches mentioned above are using different configurations, which I will try to list below: 

    SMTP settings in the Scheduling configuration 

    These are the settings you apply while configuring the Scheduling service. Based on the discussed details so far, the sender of this email should be your own email address (as seen in the screenshots). This directly communicates with the SMTP server using the provided settings. 

    The recipients will be these, listed in the third step while scheduling a test list. 

    Generating Email from the Results tab to export an existing test list result 

    If this is the email we discuss, it is generated using the local email configuration on the computer in use - an email is being directly generated and opened in Outlook, for example. This email message needs some minor adjustment to be sent - the From field is automatically populated with a default Telerik email address, which is not usable - please see the note listed here. So, you need to change this with your email address, which will be listed in the drop down. 

    Then, list the desired recipients and send the email. 

    I hope this information will be helpful for you. Though, in case of further questions, please let me know. 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  10. Padmashree
    Padmashree avatar
    24 posts
    Member since:
    May 2018

    Posted 28 Mar in reply to Elena Tsvetkova Link to this post

    Hi Elena,

     

    Email was generated by scheduled test list execution. When I tried again with no changes to configuration I am getting different results.

    1) Running Test list through Scheduled job with send email notification option selected

       Result: No email generated . Log file attached .

    2) Able to email  existing test result report when changed to from email to my email.

    3) Running test through batch file - CommnadLineClient

    This one worked before but now failing to execute. Getting exceptions

    Log file attached

    Thanks

    ERROR from command line

    ******************************

    C:\Users\PatilPad\Desktop>call Telerik.TestStudio.CommandLineClient -l "C:\AAA\
    TFS\Test Automation\Enterprise Smoke Test Suite\TestLists\Remote Execution Test.
    aiilist"  -u http://dev1.ms.tasb.org:8009/ -e myemail@tasb.org
    Check whether to compile project
    Starting to build job
    Job built, Starting Upload to storage
    Upload Complete- Queueing job on scheduler
    Telerik.TestStudio.Services.Common.Exceptions.SourceControlNotReachableException
    : Unable to reach source control server at: https://tasb-it.visualstudio.com/
       at Telerik.TestStudio.Shared.Communication.BaseCommunicationLayer.<CheckForKn
    ownResponseCode>d__35.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
    ification(Task task)
       at Telerik.TestStudio.Shared.Communication.BaseCommunicationLayer.<HandleResp
    onse>d__33.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
    ification(Task task)
       at Telerik.TestStudio.Shared.Communication.BaseCommunicationLayer.<HandleResp
    onse>d__34`1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
    ification(Task task)
       at Telerik.TestStudio.Shared.Communication.BaseCommunicationLayer.<Post>d__28
    `2.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
    ification(Task task)
       at Telerik.TestStudio.Shared.Communication.ExecutionManagerCommunicationLayer
    .<QueueJobRun>d__11.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNot
    ification(Task task)
       at Telerik.TestStudio.CommandLineClient.CommandLineProcessor.<Execute>d__9.Mo
    veNext()
    C:\Users\PatilPad\Desktop>pause
    Press any key to continue . . .



     

     

     

     

     

       

     

     

  11. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    1051 posts

    Posted 02 Apr Link to this post

    Hello Padmashree,

    Thank you for the shared details on the attempts you have tried. Please find my comments below listed as per the topics in your response. 

    1. I reviewed the generated log file and there are few things to mention. 
    - What to check: Verify what settings are applied for the test list. The setting to look for is called RunnerResponseTimeuot - this one will terminate the ArtOfTest.Runner process if this doesn't respond in the set amount of time - in other words if it doesn't return results. However, if the timeout is too short, this could simply terminate the test execution. Based on the log file, it seems that this is what happens. 
    - How to solve the issue: Therefore, open the settings of the test list and if the RunnerResponseTimeout is enabled (has different than 0 value), please choose between the two available options:
    a. disable this (set it to 0), or
    b. set a timeout, which exceeds the duration of the longest test in the test list. E.g. if the longest test requires 70 seconds to be executed , then set the RunnerResponseTimeout to at least 90 000 msec. 
    - What to test: Once the test list settings are saved, schedule the test list run again and verify if the email will be sent. If you still face any troubles, please collect the log file again. 
    - Observe the execution: Please take some time and observe the execution of the test list - does the included tests execute as expected? Is there anything unusual? Are there any unexpected dialogs? 

    2. It seems that sending email with the already generated results from calendar works as expected. 

    3. It seems your project is connected to TFS, thus the execution scheduled from the Telerik.TestStudio.CommandLineClient will always use the TFS as source to get the project files. However, the current user, you are running the tests under, doesn't seem to have access to the TFS. Please, verify if the user you are logged in in Windows, can access the TFS and possibly is using admin permissions - the error listed in the log is: 

    Check whether to compile project
    Starting to build job
    Job built, Starting Upload to storage
    Upload Complete- Queueing job on scheduler
    Telerik.TestStudio.Services.Common.Exceptions.SourceControlNotReachableException
    : Unable to reach source control server at: https://tasb-it.visualstudio.com/
     

    Can you please verify the allowed permissions for the users you are working with and then try to execute again. 

    I am looking forward to hearing from you. Thank you in advance for your cooperation. 

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