Comments (13)
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.
@tomreece it would be good to have an option for this (e.g. --skip-failed
or --ignore-failing
)
from magento2-functional-testing-framework.
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.
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.
@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.
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.
@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.
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.
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.
@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.
We are going to work on this ticket internally.
from magento2-functional-testing-framework.
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.
This feature has just been released in 3.2.0.
from magento2-functional-testing-framework.
Related Issues (20)
- Can't install MFTF framework HOT 4
- Load URL with Basic Http Authentication in MFTF HOT 2
- Entity with a CreateDataKey of createSimpleProduct could not be found HOT 1
- Invalid argument supplied for foreach() at ../src/Magento/FunctionalTestingFramework/Extension/BrowserLogUtil HOT 1
- CLI command execution in MFTF throws error HOT 2
- How to add chrome browser desired capabilities for testing ? HOT 1
- Errors via allure dependency HOT 3
- upgrade:tests references nonexistent class HOT 2
- Entity with a CreateDataKey of createCustomer could not be found HOT 2
- Serialization of 'Closure' is not allowed HOT 1
- update symfony/http-foundation HOT 1
- run:test with --remove not creating testManifest.txt file HOT 3
- Filesystem::remove() argument #1 must be string, SplFileInfo given HOT 8
- v4.3.4 - Empty exception messages thrown after test failure HOT 2
- v4.3.4 - Action waitForElementClickable ignores the "time" argument HOT 1
- Upgrading Magento 2 functional testing framework above 4.2.1 breaks test because of Namespace Changes in allure-framework HOT 2
- cannot use strings with comma sign in locatorFunction as it is wrapped with " which breaks Php HOT 1
- Console command build:project starts subprocess with system-default PHP instead of the runtime PHP HOT 1
- symfony/console dependency mismatch in MFTF v4.7.2 Standalone and Magento v.2.4.7 HOT 1
- Helpers Autoload Issue - Class `Group\AppConfigDumpSuite` is not defined. Autoload it or include into '_bootstrap.php' file of 'tests' directory HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magento2-functional-testing-framework.