Slide 12
Slide 12 text
12
Copyright 2023 NTT CORPORATION
提案手法|テストケースの生成 (2/2)
it('sample', async () => {
await new トップページ()
.gotoオーナー検索ページ()
.then((page) => page.gotoオーナー追加ページ())
.then((page) => page.addOwnerFunc({
firstname: '田中',
lastname: '太郎',
address: '千代田区',
city: '東京',
telephone: '1234567890'
}))
.then((page) => page.gotoペット追加ページ())
.then((page) => page.addPetFunc({
name: 'pochi',
birthdate: '2023-08-02',
type: 'dog'
}));
});
async addOwnerFunc({
firstname,
lastname,
address,
city,
telephone
}) {
await this.firstname.setValue(firstname);
await this.lastname.setValue(lastname);
await this.address.setValue(address);
await this.city.setValue(city);
await this.telephone.setValue(telephone);
await this.addOwner.click();
return new オーナーページ();
}
• 入力値はテスターが実際に入力
したものを利用
• 入力値を外部ファイルから入れ
るデータ駆動テストにも対応
テストケース
オーナー追加メソッド