Giter Club home page Giter Club logo

Comments (12)

gabrielcartellivia avatar gabrielcartellivia commented on September 24, 2024 1

worked! thanks @roskee

from godog.

mirogta avatar mirogta commented on September 24, 2024 1

@gabrielcartellivia can we close this issue?

from godog.

gnoe avatar gnoe commented on September 24, 2024

Hello @sumusjack, you can define where features/steps definitions are located. Take this example as reference https://github.com/cucumber/godog/blob/main/_examples/assert-godogs/godogs_test.go.
In contexts initialization you can define the function where all scenario contexts are defined.
And in options you can set the Paths property with your features' paths.

By doing so you can centralize your tests in one place and when you run go test in your project the BDD tests will run as well

from godog.

gabrielcartellivia avatar gabrielcartellivia commented on September 24, 2024

Hello @gnoe. Can I define where the tests files are located?

E.g.:
features
|__ godog.feature
services
|__ godog_test.go

from godog.

roskee avatar roskee commented on September 24, 2024

Yes. As @gnoe has said, you can specify the path of your feature file godog.feature within your test godog_test.go using the Paths field.

from godog.

gabrielcartellivia avatar gabrielcartellivia commented on September 24, 2024

image
image

This isn't working. What am i doing wrong?

from godog.

roskee avatar roskee commented on September 24, 2024

add the file names to the paths list.

...
Paths: []string{"../features/users.feature"}
...

from godog.

gabrielcartellivia avatar gabrielcartellivia commented on September 24, 2024

add the file names to the paths list.

...
Paths: []string{"../features/users.feature"}
...

image

didn't work

from godog.

roskee avatar roskee commented on September 24, 2024

What is the command you executed?

from godog.

gabrielcartellivia avatar gabrielcartellivia commented on September 24, 2024

Just godog run

from godog.

roskee avatar roskee commented on September 24, 2024

run go test inside the services directory.

from godog.

gnoe avatar gnoe commented on September 24, 2024

Thank you @roskee for replying and sorry @gabrielcartellivia for didn’t reply on time.
I'm glad that it worked!

from godog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.