Guide to running QuickStarts_NUnit_CS the sample

5 posts, 0 answers
  1. Ola
    Ola avatar
    5 posts
    Member since:
    Sep 2017

    Posted 22 Sep Link to this post

    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

  2. Ola
    Ola avatar
    5 posts
    Member since:
    Sep 2017

    Posted 22 Sep Link to this post

    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 ?

     

     

  3. Ola
    Ola avatar
    5 posts
    Member since:
    Sep 2017

    Posted 22 Sep Link to this post

    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.

  4. Ola
    Ola avatar
    5 posts
    Member since:
    Sep 2017

    Posted 26 Sep Link to this post

    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

     

  5. Nikolay Petrov
    Admin
    Nikolay Petrov avatar
    231 posts

    Posted 27 Sep Link to this post

    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
     
Back to Top