Giter Club home page Giter Club logo

Comments (13)

tomreece avatar tomreece commented on August 14, 2024 10

We discussed this today in grooming and we could not agree on how to implement it. We need your feedback.

Context
Someone else's tests that fail to generate, such as those in another module, should not stop my tests from generating. The idea is, if we have 1000 tests and 2 tests have mistakes then we will generate 998 tests and output a log message about the other 2 tests instead of failing the entire process like we do today.

But we can't decide between:

a) Add a flag, like generate:tests --ignore-failing
b) Make it the default behavior of generate:tests
c) generate:tests will return a nonzero exit code like today, but still generate every test that it could

Option A -- add a flag

  • Pros
    • Does not require any changes to our internal CICD pipeline
  • Cons
    • We want to avoid adding lots of flags to our commands

Option B -- make it the default

  • Pros
    • More intuitive that it just works
  • Cons
    • We have to change our internal CICD to fail the build if tests don't generate. This can be a lot of work.

Option C -- nonzero exit code, but still generate all else

  • Pros
    • Maintains current functionality of nonzero exit code
    • But still generates everything else
    • Best of both worlds
  • Cons
    • None that I can think of.

What do you think?

For option A put a 👍
For option B put a ❤️
For option C put a 🚀

from magento2-functional-testing-framework.

vasylmalanka avatar vasylmalanka commented on August 14, 2024 3

@tomreece it would be good to have an option for this (e.g. --skip-failed or --ignore-failing)

from magento2-functional-testing-framework.

navarr avatar navarr commented on August 14, 2024 2

There was an idea posted on twitter that I quite liked, and that I think would pair nicely with all of the above:

When a test cannot be generated, generate a stub for the test that fails - detailing the generation error.

from magento2-functional-testing-framework.

tomreece avatar tomreece commented on August 14, 2024

Internal ticket
https://jira.corp.magento.com/browse/MQE-1800

@magicsunday Thank you for your issue even though it has been almost a year now. Sorry about that. We are improving our interactions with Github.

I am interested in this idea. In the past we've had reasons to fail-fast, but we need to re-evaluate those reasons. I have created an internal ticket and we discuss further.

from magento2-functional-testing-framework.

lbajsarowicz avatar lbajsarowicz commented on August 14, 2024

@tomreece and @okolesnyk

Could you provide the final expectations according to "fail-fast"?
I can address the issue, but need to have confirmed what is the final version?

from magento2-functional-testing-framework.

tomreece avatar tomreece commented on August 14, 2024

The problem is if some tests aren't generated then they won't be run in our CICD environment. This would be bad.

I think we should keep MFTF the same, fail to generate if any test is bad.

from magento2-functional-testing-framework.

okolesnyk avatar okolesnyk commented on August 14, 2024

@lbajsarowicz @tomreece @vasylmalanka
I think we will end up generating all tests and put into logs a list of tests which had issues.
We also should introduce static check to be able to fail build when something is not generating.

Also I believe we should output error when we execute generate test for specific test. It will simplify development process.

from magento2-functional-testing-framework.

jilu1 avatar jilu1 commented on August 14, 2024

The internal ticket https://jira.corp.magento.com/browse/MQE-1800 is ready for development for next release which is targeted toward the end of August. @lbajsarowicz will you be able to work on this issue with this schedule? Please let us know. Thanks!

from magento2-functional-testing-framework.

jilu1 avatar jilu1 commented on August 14, 2024

AC

  • Generate:tests generates every *Cest file that it can
  • It does not stop when it encounters a bad test. Log testnames and return number of failed test generations in the console
    "X tests failed to generate, please see for details"
  • If any tests failed to generate, return non-zero exit code. Build should still fail if any tests fail to generate.
  • Unit Tests

from magento2-functional-testing-framework.

jilu1 avatar jilu1 commented on August 14, 2024

@lbajsarowicz Could you please let us know by end of this week if you will be able to work on this or not? Thanks!

from magento2-functional-testing-framework.

tomreece avatar tomreece commented on August 14, 2024

We are going to work on this ticket internally.

from magento2-functional-testing-framework.

lbajsarowicz avatar lbajsarowicz commented on August 14, 2024

I am really sorry, but I won't be able to maintain enough time to perform this change, @jilu1 as I'm still stuck with my main job tasks. I regret that the decisions weren't made before :-( (when I had time to do these changes).

from magento2-functional-testing-framework.

jilu1 avatar jilu1 commented on August 14, 2024

This feature has just been released in 3.2.0.

from magento2-functional-testing-framework.

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.