This is a migrated thread and some comments may be shown as answers.

Combining WPF and web tests

7 Answers 120 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Carl
Top achievements
Rank 1
Carl asked on 25 Mar 2013, 03:03 PM

Hi there
     I have a project that uses a WPF client to place information in a database, the information is then viewable in the form of reports presented in a browser session. I have a web test that can test the contents of the reports, I also have a WPF tests that tests the importing of the data. The import test is a data driven test that is capable of importing different data with each iteration, the reports test is data independent and can validate the reports regardless of their contents.

My question is how can I get the 2 tests to work together?
Ideally I would like to call the web test as a step of the WPF test, but this doesn’t seem to be allowed in test studio so is there some other way that I can get the same results?

what I want is;
run first iteration of WPF test
run web test
run second iteration of WPF test
run web test
...and so on

7 Answers, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 26 Mar 2013, 08:40 AM
Hello Carl,

You can achieve that via a coded step:

Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
Manager.SetNewBrowserTracking(true);
Manager.WaitForNewBrowserConnect("", true, 5000);
Manager.SetNewBrowserTracking(false);
this.ExecuteTest("WebTest.tstest");

It will launch a new browser, connect to it and then execute the test as step. On every WPF iteration it will call the web test.

I record a short video as a demonstration.

Hope this helps.

Regards,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Carl
Top achievements
Rank 1
answered on 26 Mar 2013, 10:10 AM
Thanks Boyan that seems to be working, but I have 2 follow up questions.


1: The web test is actualy a number of different web tests all testing different parts of the reports so I did the folowing
Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
Manager.SetNewBrowserTracking(true);
Manager.WaitForNewBrowserConnect("", true, 5000);
Manager.SetNewBrowserTracking(false);
string teststr = System.IO.Path.Combine(this.ExecutionContext.DeploymentDirectory, "Database Checks\\check allocated period duration for single period lessons.tstest" as string);
this.ExecuteTest(teststr);
teststr = System.IO.Path.Combine(this.ExecutionContext.DeploymentDirectory, "Database Checks\\Check Allocated periods for multiple period lessons.tstest" as string);
this.ExecuteTest(teststr);

This causes the tests to run one after the other using the same browser window, but if any of the tests fail it stops the rest from running, is there any way to mark them as continue on failure = true?

2: The web tests contain coded steps that write additional information to the log to help us track down exactly where the problem is, but running the tests as above seems to stop the tests from writing to the log file, is there any way to get round this so that we can get the additional information out of the log?



0
Accepted
Boyan Boev
Telerik team
answered on 26 Mar 2013, 01:58 PM
Hi Carl,

You can put the ExecuteTest code line in a try-catch block. Thus the particular test will fail but the execution of the coded step will continue.

Unfortunately since this is a single coded step in the execution log you are able to see only the log from the last test. However you can see the log of all tests in the application log.

Here is a video that demonstrates it.

Hope this helps.

Kind regards,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Sebastian
Top achievements
Rank 1
answered on 13 Jun 2014, 01:12 PM
Hello,

I am referring to you regarding WPF / WEB tests.
Can you please provide us more information concerning the dependency of WPF and Web Test? (a print screen or video)
From your video we could recognize a tree structure between Project, WPF and Web Test. Can you please explain how the tree structure was buit?

Thank you in advance.
BR


0
Boyan Boev
Telerik team
answered on 18 Jun 2014, 08:14 AM
Hello Sebastian,

I am not sure if I understand you correctly. Please give us more detailed information about your scenario.

There is no dependency between WPF and Web tests. The are fundamentally different.

Under the project in Test Studio the tests are organized in a tree structure.

Hope to hear from you soon. 

Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Sebastian
Top achievements
Rank 1
answered on 19 Jun 2014, 01:38 PM
Hy Boyan,

as I understood there is the possibility to combine a WPF test with a WEB test.
Ok, If I have a WPF test and 2 WEB tests (for e.g. Web test 1 and Web test 2).
How can I combine my WPF test only with the Web test 1.
Unfortunately I didn't understand  this part very well from the above comments.

Thank you in advance!
0
Boyan Boev
Telerik team
answered on 23 Jun 2014, 11:28 AM
Hello Sebastian,

Unfortunately you cannot combine WPF test with Web test.

As I mentioned in my previous response the are fundamentally different.

If you need further information please let us know.


Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Carl
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Carl
Top achievements
Rank 1
Sebastian
Top achievements
Rank 1
Share this question
or