cost 113 ms
如何將類別值從測試傳遞到 TearDown

[英]How to pass Category value from test to TearDown

我正在使用以下屬性運行測試 [TestCase(“First Count”), Category(“Catalog”)] 稍后在 TearDown 中,我想獲得值“目錄”。 我試過了: var cat = (string)TestContext.CurrentContext.Test.Prope ...

賽普拉斯 Typescript:如何存儲可在每次拆解后使用的變量?

[英]Cypress Typescript: how to store a variable that can be used in the afterEach teardown?

我有一些測試用例,這些用例在開始時將數據存儲在一個變量中,以便在整個測試過程中使用它。 它在測試期間工作正常,可以在拆解之前一直調用到測試的最后一步,但是當我嘗試在每次測試結束時運行的@afterEach拆解中使用它來執行任何全局清理命令時,該變量顯示為空並且不再存儲任何內容。 變量似乎意外重置。 ...

TestCaseA 拆解在 TestCaseB 啟動后運行 4 秒,這是一個錯誤嗎?

[英]TestCaseA teardown runs 4 seconds after TestCaseB starts is this a bug?

我們正在使用 ReadyAPI 3.6.0,我們使用 Jenkins 和 testrunner 來執行我們的測試套件。 我試圖了解我是否在 ReadyAPI 中發現了一個錯誤,或者它是否是用戶錯誤。 我的場景是我有一個帶有 TestCase A 和 TestCase B 的 TestSuite。對 ...

selenium.UnsupportedCommandException:找不到請求的資源,或者請求

[英]selenium.UnsupportedCommandException: the requested resource could not be found, or a request

獲取異常失敗配置:@AfterClass 拆解“org.openqa.selenium.UnsupportedCommandException:找不到請求的資源,或者使用映射資源不支持的 HTTP 方法接收到請求” enter code here //org.openqa.selenium.Uns ...

@After(@AfterEach, @AfterClass) 在 Junit 中有什么作用?

[英]What does @After(@AfterEach, @AfterClass) does in Junit?

我是 Junit 的新手。 我正在學習我們必須使用 @BeforeEach 或 @Before 來設置一個新實例。 我還了解到,當我們使用 @AfterEach 或 @Afterclass 時,是一種拆卸方法,它會在所有測試后釋放它們。 但是,我很好奇當我們不使用 @AfterEach 或 @Af ...

Kubernetes 基礎設施組件的正確拆卸順序

[英]Correct teardown sequence for Kubernetes infrastructure components

為了部署我的 k8s 集群,我kubectl apply -f folder-of-yamls/ 而且似乎執行的順序很重要。 我見過的一種方法是添加前綴001-namespace.yaml 002-secrets.yaml等來創建排序。 要拆除,如果我kubectl delete -f fold ...

pytest:在測試用例不可見的夾具中分配屬性

[英]pytest: Assigning attribute in a fixture not visible to test cases

為什么我無法在 pytest 夾具中設置 self.param 值? 這導致 我想在設置期間設置此屬性,因為我最終將使用該參數執行方法級拆卸(不是類級拆卸,所以我沒有使用產量)。 在這個例子中,我的測試看不到 self.param 值,我的拆卸函數也看不到。 將 self.param = 2 ...

笑話:如何在(僅)一個單獨的測試后拆解

[英]jest: How to teardown after (just) an individual test

jest提供afterEach 、 beforeEach 、 afterAll和beforeAll來完成設置和拆卸邏輯。 我想做的是在一項特定測試后進行清理。 考慮以下: 上面的問題... 如果上面的測試由於某種原因失敗,那么delete global.foo永遠不會運行。 這意味着它之后的所有測 ...

是否調用 pytest_runtest_teardown 來跳過測試,而 pytest_runtest_setup 不是?

[英]Is pytest_runtest_teardown called for skipped tests while pytest_runtest_setup is not?

我有一個實現以下鈎子的插件: 一切正常,直到一些測試開始拋出AttributeError: 'NoneType' object has no attribute 'do_bla'並且確實item.config.bla是None 這發生在我標記為的測試中 我嘗試ipdb - 設置掛鈎 - 但它沒有被 ...

為 Android 中的單個測試添加拆卸塊

[英]Add teardown block for single test in Android

在 iOS 中存在一個撕裂塊,您可以將其添加到名為addTearDownBlock的單個測試中,然后將其放入單個測試中,它只會針對該單個測試執行。 android有這個類似的版本嗎? ...

laravel dusk tearDown() 必須與 Illuminate\\Foundation\\Testing\\TestCase::tearDown() 兼容

[英]laravel dusk tearDown() must be compatible with Illuminate\Foundation\Testing\TestCase::tearDown()

當我將 tearDown() 方法應用於我的測試類時,我收到一條錯誤消息,告訴我the tearDown() must be compatible with Illuminate\\Foundation\\Testing\\TestCase::tearDown()我做錯了什么? 每次我運行測試 ...

將變量傳遞給 pytest_sessionfinish

[英]passing variable to pytest_sessionfinish

我正在尋找一種方法來在 pytest 中將一些變量從會話開始傳遞到會話結束。 更具體地說,我正在使用fixture scooped session,我在其中創建了一個串行通信對象,例如: 在這一步之后,我運行了一些測試。 最后我有 pytest_sessionfinish(session, ...

有沒有辦法在運行所有測試后執行拆卸功能?

[英]Is there a way to execute a teardown function after all tests have been run?

在 Rust 中,有沒有辦法在使用標准測試庫運行所有測試后(即在cargo test結束時)執行拆卸功能? 我不打算在每次測試后運行拆卸功能,因為它們已在這些相關帖子中討論過: 如何在 Rust 中運行任何測試之前運行設置代碼? 如何為集成測試初始化​​記錄器? )) 這些討論 ...

@拆機后,休眠100ms,測試全部通過

[英]@After teardown, sleep 100ms, tests all passed

當我用idea運行所有測試時,它會隨機失敗,但是當我在tearDown函數中插入以下代碼時: 所有測試都會通過! 不知道為什么,誰能幫我解釋一下? ...

類型“編號”不可分配給類型“TeardownLogic”

[英]Type 'number' is not assignable to type 'TeardownLogic'

我做了一個返回時間Observable的服務, 但是,它給出了以下錯誤, src/app/services/date.service.ts(11,5) 中的錯誤:錯誤 TS2322:類型“編號”不可分配給類型“TeardownLogic”。 我找到了這個解決方案( Typescript 錯誤:s ...

機器人框架在失敗中停止拆卸執行

[英]robot framework stop teardown execution in failure

我正在使用機器人框架來測試我的應用程序我在測試中使用了拆卸。 它按預期工作,如果我的測試結束或失敗,則拆卸開始執行。 當拆卸執行失敗時,我的問題就開始了,然后我希望它停止。 場景是“在過濾器中插入名稱”失敗時,我希望它停止運行,但它執行“刪除用戶”關鍵字。 可以預防嗎? ...

如果當前測試失敗,如何檢查 mocha (tdd) 的拆卸方法?

[英]How to check in the teardown method of mocha (tdd) if the current test failed?

我知道如何在 mocha 的afterEach()方法中檢查測試是否失敗:這在這里解釋: 從 Mocha 的 afterEach 鈎子中檢測測試失敗但是那些使用suite和test (tdd)而不是describe和it的人呢? 如何檢查當前測試是否在此處失敗? 相同的代碼將不起作用,因為stat ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM