Hi folks,
I'm currently working on a condition for our Ranorex/Jenkins builds, which should make the tests to use different data range for daily and for night builds. While the daily builds are much more frequent, we prefer to do only a basic "smoke" test (with just one or two elements), while the night builds are supposed to perform more thorough testing with extended/complete data range.
I was able to implement such condition using DataContext.SetRange function. However, I've noticed one weird behavior. The Ranorex progress dialog is not always updated.
Here is a screenshot from the below attached test project...
As you can see, the progress shows 1/10 range. The thing is, that the that actual range is limited to just 2 iterations and the test correctly ends after second iteration! It's just that the max range value (in progress dialog) is not updated.
Please try this project...
Just run it and you should immediatelly see the problem.
It seems the problem is caused by "All Rows" option...
If the Data Range is set to "All Rows" and then the data range is set somewhere from code, the max range value is not updated (in progress dialog).
If the Data Range is set using "From:" option, the max range value is updated correctly.
Hope it makes sense?
Progress dialog not correctly updated after SetRange
Progress dialog not correctly updated after SetRange
You do not have the required permissions to view the files attached to this post.
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: Progress dialog not correctly updated after SetRange
BTW, the above attached test project shows also another issue, that I did not experience before. From some unknown reasons, the report file shown after the end of test is not always the modern one (3.x/4.x compatible) but something I suspect is an old 2.x report format?...
http://www.ranorex.com/forum/extra-rxlo ... t4656.html
Sure enough, I'm using "Report.Log" in Program.cs in Wait_For_Available_License function. It's called before the TestSuite is initialized. But I'm using the same construction in production level test suite, where no "old format" report is created?
To reproduce this issue, run the above attached project (from RX Studio) multiple times in a row. Usually, for the first time it shows correct 4.x report...
PS: I just remembered there was reported issue like this by someone else... Sure enough, I'm using "Report.Log" in Program.cs in Wait_For_Available_License function. It's called before the TestSuite is initialized. But I'm using the same construction in production level test suite, where no "old format" report is created?
You do not have the required permissions to view the files attached to this post.
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
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Progress dialog not correctly updated after SetRange
Hello,
Thank you for reporting this issue.
I will add an entry in our internal bugtracking system in order to analyze it.
Please note that API methods are internal methods of Ranorex and can change every time a new version of Ranorex is released. Therefore, it is not recommended to use non supported API methods (internal methods).
Concerning your second issue:
If you are using Report.Log before the Test Suite is initialized, reports are generated in both formats (old 2.x style and new style). I have found reports in both styles using your solution.
Do you use the same Ranorex version in your production level test suite?
Regards,
Markus (T)
Thank you for reporting this issue.
I will add an entry in our internal bugtracking system in order to analyze it.
Please note that API methods are internal methods of Ranorex and can change every time a new version of Ranorex is released. Therefore, it is not recommended to use non supported API methods (internal methods).
Concerning your second issue:
If you are using Report.Log before the Test Suite is initialized, reports are generated in both formats (old 2.x style and new style). I have found reports in both styles using your solution.
Do you use the same Ranorex version in your production level test suite?
Regards,
Markus (T)
Re: Progress dialog not correctly updated after SetRange
Hi Markus,
Thanks for the response.
As for the first problem, could you please suggest me a better programmatic way to achieve my goal to use different data range for daily/night tests (other than to use internal APIs)? The test project I've uploaded is just a test, but it closely mimics what I want to achieve. I hope to use a global parameter, that I would pass via command line to a Jenkins-based test builds (different for day and night builds).
As for the report problem, please ignore it. It seems it was definitely caused by the "Report.Log" used before the test suite initialization. I was under the impression I'm using this line of code also in the production level test suite but I was wrong
Thanks for the response.
As for the first problem, could you please suggest me a better programmatic way to achieve my goal to use different data range for daily/night tests (other than to use internal APIs)? The test project I've uploaded is just a test, but it closely mimics what I want to achieve. I hope to use a global parameter, that I would pass via command line to a Jenkins-based test builds (different for day and night builds).
As for the report problem, please ignore it. It seems it was definitely caused by the "Report.Log" used before the test suite initialization. I was under the impression I'm using this line of code also in the production level test suite but I was wrong
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
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Progress dialog not correctly updated after SetRange
Hello,
Would it be possible for you to create two different solutions (one for day and one for night)?
Then, you could simply define the data range differently for each solution in the properties.
Regards,
Markus (T)
Would it be possible for you to create two different solutions (one for day and one for night)?
Then, you could simply define the data range differently for each solution in the properties.
Regards,
Markus (T)
Re: Progress dialog not correctly updated after SetRange
Hi Markus,
Thanks for the suggestion but I prefer to keep just one solution. The experience taught me that multiple projects/solutions are always harder to maintain. Therefore I'm looking for an option to switch the data range programmatically.
The current solution works quite OK (except the non-updated progress) so if there is no better option than to use two solutions, I will take the risk of using internal API. I believe it will still be easier to update the code (in case of changed API) than to maintain two solutions.
Thanks for the suggestion but I prefer to keep just one solution. The experience taught me that multiple projects/solutions are always harder to maintain. Therefore I'm looking for an option to switch the data range programmatically.
The current solution works quite OK (except the non-updated progress) so if there is no better option than to use two solutions, I will take the risk of using internal API. I believe it will still be easier to update the code (in case of changed API) than to maintain two solutions.
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: Progress dialog not correctly updated after SetRange
Do you plan to fix this bug? I am still getting it with the Ranorex 5.1.2
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Progress dialog not correctly updated after SetRange
Hello Boris,
This “bug” occurs because the “SetRange”-method is not used correctly.
Note: This is internal API. Therefore, it should be used with caution. Please keep in mind that we do not provide support for the Ranorex internal API because it can be changed at any time.
In order to change the Data range of your data connectors, please execute your test executables via command line.
The argument for changing the data range is the following:
http://www.ranorex.com/support/user-gui ... html#c3022
Regards,
Robert
This “bug” occurs because the “SetRange”-method is not used correctly.
Note: This is internal API. Therefore, it should be used with caution. Please keep in mind that we do not provide support for the Ranorex internal API because it can be changed at any time.
In order to change the Data range of your data connectors, please execute your test executables via command line.
The argument for changing the data range is the following:
Further information about running Ranorex via command line can be found here:testcasedatarange|tcdr:<name or guid of test case>=<data range>
Sets the data range for a testcase.
http://www.ranorex.com/support/user-gui ... html#c3022
Regards,
Robert
Re: Progress dialog not correctly updated after SetRange
I need to see the same result disregarding whether a test suite is started from a command line or by clickiing the Run button. As I understood from your answer, that has to function with the right calls?
What they are? I see there is the routine "SetCurrentRange" or there is some other ways?
What they are? I see there is the routine "SetCurrentRange" or there is some other ways?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Progress dialog not correctly updated after SetRange
Hi Boris,
Unfortunately, we do not support internal API. Therefore, we do not post internal API to our forum. It is not possible to define multiple data ranges for the same Test Case within Ranorex Studio.
Possible Workarounds:
Regards,
Robert
Unfortunately, we do not support internal API. Therefore, we do not post internal API to our forum. It is not possible to define multiple data ranges for the same Test Case within Ranorex Studio.
Possible Workarounds:
- • Duplicate the solution in order to set different data ranges
• Execute the solution via command line using the “tcdr” argument
• Create multiple Test Suite files using the Ranorex Test Suite Runner.- o Open the solution with the Ranorex Test Suite Runner.
o Modify the Data Range of the specific connectors.
o Save changes to a new *.rxtst file
- o Open the solution with the Ranorex Test Suite Runner.
Regards,
Robert