While SpecFlow has been retired, the journey doesn’t stop here and a new chapter in your professional journey isjust beginning. ShiftSync is yourgo-to community for quality engineering, offering resources, events, andnetworking opportunities to help you stay ahead in testing automation, and beyond. We’re excited about the future and hope you’ll continue this journey with us in the ShiftSync com
テストスイート,テストファイルを作っただけでは,パッケージのテストができませんので,パッケージ本体(この記事ではPerson)を作ります パッケージPersonの確認 以下のようなパッケージPersonを作ることを考えます 構造体Personを持つ 構造体Personは,string型のフィールドnameを持つ フィールドnameに関するSetterとGetterである以下のメソッドを持つ SetName(string): フィールドnameをセットする GetName() (string,error): nameを読み出す.nameがセットされていない場合はエラー"Name is not set"が返る テストファーストの考え方から,テストからまず作ります Person_test.goの実装 ginkgo generateで作られたPerson_test.goは雛形で,中身がありません

import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ... ) var _ = Describe("Checking books out of the library", Label("library"), func() { var library *libraries.Library var book *books.Book var valjean *users.User BeforeEach(func() { library = libraries.NewClient() book = &books.Book{ Title: "Les Miserables", Author: "Victor Hugo", } valjean = users.NewUser("Jean Valjean") }) When("
1リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く