1

I use ginkgo to write some tests, including:

  • books_suite_test.go
  • install_test.go
  • reading_test.go
  • isbn_test.go
  • uninstall_test.go

how to run these tests in a specific order as following:

install_test.go -> reading_test.go -> isbn_test.go -> uninstall_test.go

I found ginkgo can not ensure the test order. Is there any way to do this?

LEo
  • 442
  • 5
  • 21

1 Answers1

-2

User the Ordered keyword in your Describe-block to run the block as a "Ordered Container". https://onsi.github.io/ginkgo/#ordered-containers

You should not build tests that rely on tests of other files. Because the dirty answer to your question is that it's possible to put Containers and It-blocks into functions and call them in the order you desire

Ordered Container

lehp
  • 1