0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【TestCafe】TestCafeで実行スピードを変更する メモ

Posted at

TestCafeで実行スピードを変更する

TestCafeでテストを実行するとき、

testcafe chrome test.ts

のように実行します。

しかし、これだと実行スピードが速すぎて本当にできているのか疑うときがあります。
そこで、実行スピードを下げることができるコマンドが存在します。
以下の様に記述します。

testcafe chrome test.ts --speed 0.5

0.5の様に実行スピードを変更することができます。
testcafeのjsonを定義してそちらに記載することで変更することもできますが、こちらの方が手軽だと思います。

余談

テストカフェでは実行したいテストを絞ることができます。
例えばこんなテストケースがあるとして、test1のみ実行したいとします。

test("test1",async(t) => {

})

test("test2",async(t) => {

})

その場合、testの後にonlyを付けてあげることで絞ることができます。

test.only("test1",async(t) => {//実行される

})

test("test2",async(t) => {//実行されない

})
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?