GithubHelp home page GithubHelp logo

Behat doc testing about sulu-docs HOT 5 OPEN

sulu avatar sulu commented on July 28, 2024
Behat doc testing

from sulu-docs.

Comments (5)

webmozart avatar webmozart commented on July 28, 2024

Interesting idea :) A big issue that I see here is that Behat tests are, while very precise, not necessarily easy to read. They serve as specification, so that's fine. Documentation, on the other hand, serves as learning resource. Readability and understandability should be key there. I don't think we can achieve that with Behat tests.

Second, Behat tests require changes to the FeatureContext every time a sentence is reworded. This would slow down work on the documentation considerably.

Apart from this issue, I think that starting to write Behat tests for Sulu is a great idea.

from sulu-docs.

dantleech avatar dantleech commented on July 28, 2024

Well, I think (I had to check) the idea of the extension is to embed the behat sentences in the RST file, but they would not be rendered in the documentation. So they are essentially static and invisible.

from sulu-docs.

dantleech avatar dantleech commented on July 28, 2024

btw. we are already using Behat to test Sulu Standard, but the tests are quite flaky IIRC due to Husky/JS.

from sulu-docs.

danrot avatar danrot commented on July 28, 2024

@dantleech Would not even say that this is caused by Husky or JS, I am sure quite often we are not waiting for the right events to happen. If we write at some points only And I wait for a second it doesn't surprise me that the tests are flaky.

And apart from that it might not even be necessary to test this kind of stuff using behat. We could simply take the commands written, execute all of them, and see if we have a working sulu installation at the end. However, this is probably not as easy as it sounds 😕

from sulu-docs.

dantleech avatar dantleech commented on July 28, 2024

On Thu, Mar 10, 2016 at 08:28:58AM -0800, Daniel Rotter wrote:

[1]@dantleech Would not even say that this is caused by Husky or JS, I am
sure quite often we are not waiting for the right events to happen. If we
write at some points only And I wait for a second it doesn't surprise me
that the tests are flaky.

The point is there are no events we can listen to to say "OK" this is
loaded, its very hit-and-miss, and then it is flaky still, for whatever
reason (at least the last time I saw it, which tbh was over half a year
ago).

And apart from that it might not even be necessary to test this kind of
stuff using behat. We could simply take the commands written, execute all
of them, and see if we have a working sulu installation at the end.
However, this is probably not as easy as it sounds [2]:confused:

Behat was just a tool that could be used to execute the generated file.
There are other ways to do it, but all would involve either annotating
the markup or adding a fair amound of regexes in different file.

This is also not about executing (and testing) commands, but also code
snippets and configuration.

from sulu-docs.

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.