Cypress
ブラウザ上で動くテストフレームワーク
https://docs.cypress.io/guides/overview/why-cypress
記述例 (サンプルに入ってる)
code:actions.js
context('Actions', () => {
beforeEach(() => {
cy.visit('https://example.cypress.io/commands/actions')
})
it('.type() - type into a DOM element', () => {
// https://on.cypress.io/type
cy.get('.action-email')
.type('fake@email.com').should('have.value', 'fake@email.com')
// .type() with special character sequences
.type('{leftarrow}{rightarrow}{uparrow}{downarrow}')
.type('{del}{selectall}{backspace}')
なんかわかりやすそう 増井俊之.icon
hata6502.icon 便利ですね。1年くらい業務で使ってました。
記述が楽ですねー 増井俊之.icon
% npx cypress open
GUIが開く
Chromeで動く
% npx cypress run -s テストファイル
ターミナルで動く (ヘッドレスブラウザ)
/nishio がいろいろ解説してる
EpisoPass.comをテストしてるとこ 増井俊之.icon
スクリプト
https://www.youtube.com/watch?v=CdFH9PQYVRo