Answer the question
In order to leave comments, you need to log in
How to run integration tests in a given order?
Greetings!
There is a test that needs to be executed in order, first Create (get an ID from it) then Read using the received ID, and so on.
How to do it?
package integration
import (
"context"
"testing"
...
func TestCreate(t *testing.T) {
...
}
func TestRead(t *testing.T) {
...
}
func TestUpdate(t *testing.T) {
...
}
func TestDelete(t *testing.T) {
...
}
Answer the question
In order to leave comments, you need to log in
It's not right to do so. Tests should not depend on each other.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question