Hi,
Goal is that after testrun I send an email about test result.
I have added the EmailModule to [TEARDOWN] and I get the email and attachment after testrun.
I have a few questions / problems
1. Should I add the username&password (using GMAIL) to Global parameters? (see attachment)
2. As I have now the data in "Value" field (password also), it is shown in testreport when Global parameters are listed; how to get rid of that?
3. How can I get e.g. testrun date to be added to Subject?
4. Is it possible to get testrun fails or some other data to be added to body?
I hope someone understand my problems...
EmailModule & variables & parameters...
EmailModule & variables & parameters...
You do not have the required permissions to view the files attached to this post.
Re: EmailModule & variables & parameters...
Either this or you can pass the user name/password via command line parameters instructing Ranorex to fill given global parameters with new values. See this User Guide paragraph about command line arguments:1. Should I add the username&password (using GMAIL) to Global parameters? (see attachment)
https://www.ranorex.com/help/latest/les ... orexStudio
I'm afraid, there is currently no way to mask the Global Parameters in report. The only way how to mask data displayed in report, is to use Data Connector, in which you can specify, which entries should be masked in report. Anyway, if you are worrying about user name/password, you are probably using a personal account for testing? This is a big mistake. You should never use sensitive data for testing purposes! Just create a dummy email for TA purposes.2. As I have now the data in "Value" field (password also), it is shown in testreport when Global parameters are listed; how to get rid of that?
You can use DateTime method to get the current date/time...3. How can I get e.g. testrun date to be added to Subject?
Code: Select all
string dateFormat = "dd/MM/yyyy";
//get actual date
System.DateTime curDate = System.DateTime.Today;
//convert date to string
string curDateStr= curDate.ToString(dateFormat);
Sure, you can get the test case/suite status using these lines...4. Is it possible to get testrun fails or some other data to be added to body?
Code: Select all
var tcStatus = TestSuite.Current.GetTestContainer("tcName").Status; // get status of specified TC
var tcStatus = Ranorex.Core.Reporting.ActivityStack.Current.Status; // returns test suite status
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: EmailModule & variables & parameters...
Thank you so much for a quick answer!
1. & 2. Yes, I did create a dummy email and no big problem here. And good to know that I can utilize command line.
3. & 4. Date method I have been using but new information about test case/suite status, thanks.
Now the most stupid question
How do I add (e.g. date to email subject). I have read (and even using variables little), but if you could give a simple example how to add the date to email subject.
Limited knowledge about C#; should I somehow call this
Ranorex.AutomationHelpers.Module.EmailModule.Subject variable and pass the data there?
1. & 2. Yes, I did create a dummy email and no big problem here. And good to know that I can utilize command line.
3. & 4. Date method I have been using but new information about test case/suite status, thanks.
Now the most stupid question
How do I add (e.g. date to email subject). I have read (and even using variables little), but if you could give a simple example how to add the date to email subject.
Limited knowledge about C#; should I somehow call this
Ranorex.AutomationHelpers.Module.EmailModule.Subject variable and pass the data there?