I am new to Telerik and i am trying my first tests in order to get a better understanding. I am not sure though if i have post in the right section in the forum.
I am dealing with a problem which is the following.
I want to test a desktop application (WPF tests). So, when i set the exe file in the telerik test studio form the configure menu, every time i press record the application starts with the login screen of the application. Is there any way to bypass that.
The problem is that i want to skip the login procedure and not execute that step every time and therefore start the recorder and test steps from a different point inside the application and execute from he selected point and onward each time.
7 Answers, 1 is accepted
Thank you for sharing details on your query.
Of course, it is helpful to run the tests partially until you get all of these adjusted to perform stable executions. Test Studio provides you two possibilities when we speak of testing a WPF application. One option is to execute the test partially to a certain step in the test using the Run... options from the step context menu. Run->To here, for example, will execute the test to the selected step and will attach a recorder to the application instance once the steps finish or fail. Then, in record mode and a recorder toolbar attached to the application, you can see the other options in the Run... menu active.
The other approach available for WPF applications allows you to attach a recorder to an already running instance of the application. Please see the screenshot for reference how to attach the recorder to the existing app window.
I hope the above is useful for you. Though, in case you have any further queries, please let me know.
Thank you very much fro your response, it was very helpful and elaborate. I have tried both approaches. I have attached a relevant screenshot regarding the second approach so to make clear to me that it is the same action we are talking about.
My concern still applies though, as for both approaches, when i am pressing the execute button the application (I am always referring about WPF applications) always displays the login screen. Therefore when the step executed (either run to here or in an already running application) will always fail.
Hope i helped in making the "point of trouble" clear.
Thanks a lot
Thank you for getting back to me.
Let me please summarize what my understanding so far is - the WPF application you are automating starts with a login screen. The actions to enter username and password are not included in the test which you currently develop, and thus the execution (complete test run using the Execute button or start partial run with the option Run->To Here) fails because the login screen appears. Please if this is not correct, let me know.
Though, if this so, I am wondering why the login steps are not included in that test - you can separate these in a test and add it as a test as step at the beginning of each new test. I guess, the application under test is supposed to start each time with its login screen, so you certainly need to record the login actions.
Additionally, one more thing to note is that, Execute and Run->To Here always triggers a new process/instance of the application under test. So, if the requirement is to run any other parts of the test steps or continue recording, you should use the other options listed in the Run... sub-menu or to attach the recorder to an already running instance of the application.
Having that said, I would like to address your doubts for the second approach. From the screenshot, it seems this is executed correctly and I am wondering if you face any troubles with that approach?
I hope the above helps. Still to be able to assist further, I would appreciate if you can elaborate more on what you expect to see as test execution behavior and what in the current behavior is not as per your needs. That way I will have further details about the issue you experience and will be able to provide further details. Thanks in advance.
Thank you once more for your very helpful feedback. Let me try to elaborate a bit more.
"The actions to enter username and password are not included in the test which you currently develop, and thus the execution (complete test run using the Execute button or start partial run with the option Run->To Here) fails because the login screen appears. Please if this is not correct, let me know."
Yes, the part mentioned above is correct.
My trouble is as follows:
The application i am trying to automate is complex and has a lot of configuration along the way until i get an outcome, additionally, each input along with the relevant configuration each time results in a different outcome. Having said that, what i am trying to do is that to start from specific "step" of the application each time. So when i press the execute button from telerik test studio i do not have to start over again form login (this is what is currently happens). Besides that the tests i have write do not have to include every time the login process. I have thought as well the test as a step option for login but still i am not sure it will solve the trouble that much.
i.e. Imagine that until i reach a specific step in the application that i want to test, besides the configuration, there are a lot of steps preceded. I want to avoid that overkill and start from a specific point.
I was wondering maybe if there is a way (via code maybe) to store the state of the application (from the point i want each time) and start from that point.
I hope i helped to elaborate on the issue a bit more.
Thanks a lot
Thank you for the additional notes. I hope that we have a solution for the described scenario and this is listed here - how to parameterize the WPF application. Please take a look at that solution and let me know if it fits your needs or it is not what you are after.
This should be working if you execute a test using the Run->To Here option and the Execute button. Otherwise, you could manually perform the necessary actions and then attach the recorder to the already running instance of the app to continue recording from its current state. Did you have the chance to try that out? Was it working for you as you expect it?
Alternatively, I will appreciate if you can record a short video of these preceding configuration steps within the application and send it over this thread. This will help me understand the case in further details and possibly find a proper solution, if the above is not suitable.
Thank you once again for your cooperation.
Thank you very much once more for your very valuable information and guidance. I am working on the information provided regarding the parameterization of WPF application. In any case i will proceed with the login process included each time,as the application contains various access rights regarding the user login. Therefore the content of the application is reshaped regarding the user login each time.
In any case any new issue arises i will go with a new post in forum.
Thank you very much for the assistance provided.
Thank you for your cooperation during our discussion. I am pleased to know the provided information is helpful for you and will be happy to assist again in case you face any other difficulties.