Skip to content
Discussion options

You must be logged in to vote

Another lightweight, code-first option is BDTest (also mine). It has no Gherkin and no generated code. You write Given/When/Then chains in C#.

It has a dedicated TUnit adapter (BDTest.TUnit), and cancellation tokens work the way you'd expect. Any async step can take a CancellationToken, and the adapter automatically links it to TestContext.Current.Execution.CancellationToken. That means TUnit's [Timeout], Execution.Cancel() and runner cancellation all flow into your steps:

[Story(AsA = "user", IWant = "to talk to Ollama", SoThat = "I get answers")]
public class OllamaTests : TUnitBDTestBase<OllamaContext>
{
    [Test, Timeout(60_000)]
    [ScenarioText("Ollama is reachable")]
    public a…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@srollinet
Comment options

@thomhurst
Comment options

@thomhurst
Comment options

@srollinet
Comment options

Comment options

You must be logged in to vote
1 reply
@kieronlanning
Comment options

Answer selected by kieronlanning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants