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

Guide to running QuickStarts_NUnit_CS the sample

4 Answers 68 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ola
Top achievements
Rank 1
Ola asked on 22 Sep 2017, 12:57 PM

Hello

I tried to run containd in QuickStarts_NUnit_CS  from the install to no avail.

1, Created new project from existing code, in VS community 2017

2, selected C#

3,Select the location of where to find the code as \QuickStarts_NUnit_CS

4,gave it a name

5,selected class library

A new project is created but, I had to manually link to ArtOfTest dll to make many error go away,

Plus the using nunit,framework statment is "not found" , right now I am have trouble locating where nnunit.framework is

It is installed, and I found it easily enough when using a visual studio unit test solution.

Please help

 

Ola

4 Answers, 1 is accepted

Sort by
0
Ola
Top achievements
Rank 1
answered on 22 Sep 2017, 05:17 PM

Ok, I finally got this running by

Manually referencing ArtOftest

Changing my Vstudio to target 4.5 (cos one of the items  appeared to require it)

Adding Nunit.via nuget packages

Referencing Nunit framework

Referencing Nunit core

I am only running the Htmlcontrols test and have excluded all the other files from the project.

 

Every test fails, and the browser message dissappear before I can do anything, I have tried debug under the test drop down list but the error message appear different from the browser message., what can I do please ?

 

 

0
Ola
Top achievements
Rank 1
answered on 23 Sep 2017, 12:23 AM

The error is:

Test Name:    CommonHtmlControlMethodsProperties
Test FullName:    QuickStarts_NUnit_CS.HtmlControls.CommonHtmlControlMethodsProperties
Test Source:    C:\Program Files (x86)\Progress\Test Studio\Samples\Testing Framework\QuickStarts_NUnit_CS\Tests\HtmlControls.cs : line 229
Test Outcome:    Failed
Test Duration:    0:00:03.96

Result StackTrace:    
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Browser.InternalNavigateTo(Uri uri, Boolean useDecodedUrl)
   at ArtOfTest.WebAii.Core.Browser.NavigateTo(Uri uri, Boolean useDecodedUrl)
   at ArtOfTest.WebAii.Core.Browser.NavigateTo(String url, Boolean useDecodedUrl)
   at QuickStarts_NUnit_CS.HtmlControls.MyTestInitialize() in C:\Program Files (x86)\Progress\Test Studio\Samples\Testing Framework\QuickStarts_NUnit_CS\Tests\HtmlControls.cs:line 94
Result Message:    
ArtOfTest.WebAii.Exceptions.ExecuteCommandException : ExecuteCommand failed!
InError set by the client. Client Error:
System.Runtime.InteropServices.COMException (0x800704C7): The operation was canceled by the user. (Exception from HRESULT: 0x800704C7)
   at ArtOfTest.ShDocVw.WebBrowserClass.Navigate2(Object& URL, Object& Flags, Object& TargetFrameName, Object& PostData, Object& Headers)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommandInternal(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Action',Info:'NotSet',Action:'NavigateTo',Target:'null',Data:'file:///C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Pages/HtmlControls.htm',ClientId:'Client_b180d046-9443-4b0f-9bec-d832aa963c84',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.Runtime.InteropServices.COMException (0x800704C7): The operation was canceled by the user. (Exception from HRESULT: 0x800704C7)
   at ArtOfTest.ShDocVw.WebBrowserClass.Navigate2(Object& URL, Object& Flags, Object& TargetFrameName, Object& PostData, Object& Headers)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommandInternal(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none.
Result StandardOutput:    [Trace] : Unexpected dialog encountered. Closing the dialog, and halting execution.

0
Ola
Top achievements
Rank 1
answered on 26 Sep 2017, 11:24 PM

Hi All, I fixed the problem above, it was to do with the Testpage address.

 

Anyway, I need another question answered.

 

Even when the target page of say a .net web app crashes, the test passes.

 

Is it possible to get Testing framework to tell me about unhandled exceptions in the target page ?

I got The framework working quite well, discovered an error in the target app, but I was physically watching it happen,

Or is it that folks simply make sure they look for something in the html after page load ? And that fails the test if the pageload crashed?

 

Cheers

 

Ola

 

0
Nikolay Petrov
Telerik team
answered on 27 Sep 2017, 11:09 AM
Hi Ola,

Thank you for your interest in our product. 

In general the framework works with the DOM of the application. The approach here could be to assert on certain functionality as the goal of the unit test method.

Please refer to our documentation to get further details and how to when working with Testing Framework.

Kind Regards,
Nikolay Petrov
Progress Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
Ola
Top achievements
Rank 1
Answers by
Ola
Top achievements
Rank 1
Nikolay Petrov
Telerik team
Share this question
or