编码的UI测试需要2-3分钟才能通过 [英] Coded UI test takes 2-3 minutes to pass

查看:53
本文介绍了编码的UI测试需要2-3分钟才能通过的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我正在使用Coded UI来运行一些自动化测试,并且其中一项测试需要花费很长时间才能完成。

So I am working with Coded UI to run some automated tests and one of the tests takes an extremely long time to complete.

我使用了断点,发现结束获取代码的底部代码,几分钟后什么都没有发生,然后最终Assert.AreEqual完成并通过了测试。

I used breakpoints and found that after End Get in the bottom block of code, nothing happens for minutes and then finally the Assert.AreEqual completes and the test passes.

我尝试更改一些播放设置,但没有任何更改改变了。有人知道发生了什么事,以及如何解决它吗?

I tried changing a few playback settings but nothing changed. Does anyone know what is going on, and how I can fix it?

-代码的第一块是测试调用的生成的Assert方法

-The first block of code is a generated Assert method that gets called by the test

-第二个代码块在Assert参数中调用

-The second block of code is called in the Assert parameters

    '''<summary>
    '''assert_clicked_columnhead_requestor - Use 'assert_clicked_columnhead_requestorExpectedValues' to pass parameters into this method.
    '''</summary>
    Public Sub assert_clicked_columnhead_requestor()
        Dim uINameCell As HtmlCell = Me.UIAppWindow1.UIAppDocument.UIX978532666mkrdataTblTable1.UINameCell

        'Verify that 'Name' cell's property 'InnerText' equals 'Name'
        Assert.AreEqual(Me.assert_clicked_columnhead_requestorExpectedValues.UINameCellInnerText, uINameCell.InnerText)
    End Sub


    Public Overridable ReadOnly Property assert_clicked_columnhead_requestorExpectedValues() As assert_clicked_columnhead_requestorExpectedValues
        Get
            If (Me.massert_clicked_columnhead_requestorExpectedValues Is Nothing) Then
                Me.massert_clicked_columnhead_requestorExpectedValues = New assert_clicked_columnhead_requestorExpectedValues()
            End If
            Return Me.massert_clicked_columnhead_requestorExpectedValues 'PROBLEM HERE
        End Get
    End Property

作为要求ted

    '''<summary>
    '''click_columnhead_requestor
    '''</summary>
    Public Sub click_columnhead_requestor()
        Dim uIRequestorCell As HtmlHeaderCell = Me.UIAppWindow1.UIAppDocument.UIRequestorCell

        'Click 'Requestor' cell
        Mouse.Click(uIRequestorCell, New Point(51, 23))
    End Sub

    Public ReadOnly Property UIAppWindow1() As UIAppWindow1
        Get
            If (Me.mUIAppWindow1 Is Nothing) Then
                Me.mUIAppWindow1 = New UIAppWindow1()
            End If
            Return Me.mUIAppWindow1
        End Get
    End Property

    Public ReadOnly Property UIX978532666mkrdataTblTable1() As UIX978532666mkrdataTblTable1
        Get
            If (Me.mUIX978532666mkrdataTblTable1 Is Nothing) Then
                Me.mUIX978532666mkrdataTblTable1 = New UIX978532666mkrdataTblTable1(Me)
            End If
            Return Me.mUIX978532666mkrdataTblTable1
        End Get
    End Property


推荐答案

¿?您是否尝试过更改..

¿? have you tried changing the value of ..

Playback.PlaybackSettings.SearchTimeout =毫秒;

msdnplayingsettings.searchtimeout

祝你好运并告诉我们一些事情

good luck and tell us something

这篇关于编码的UI测试需要2-3分钟才能通过的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆