Readit News logoReadit News
newmnhn commented on Asking developers to do QA is broken – why anyone should own QA   rainforestqa.com/blog/acc... · Posted by u/ukd1
fredsters_s · 4 years ago
We have a free trial - you should try it instead of criticizing theory, I would love to get your feedback on the actual product, here or directly (I'm fred@rainforestqa.com).

Regarding DOM interaction, you're missing the point. All automation that tests the front end code, regardless of how it attaches, is using a path that is different from your end user. The end user interacts with the application visually. That's why we test visually. A decrease in code-based brittleness is just a nice side effect. And as you note, this is a very high-level post outlining one key idea about quality ownership. You may be interested in this, which is one of our front end folks talking about why we believe testing visually is superior: https://www.rainforestqa.com/blog/the-downfall-of-dom-and-th...

We have been selling a QA solution for almost 10 years. In that time we've seen thousands of setups and directly worked with hundreds of teams. Your claim "weaknesses of automated test frameworks [...] are compensated for quite easily and routinely" is, quite simply, not true for the majority of engineering teams - few QA leaders, including proponents of Cypress, would agree with you.

newmnhn · 4 years ago
> The end user interacts with the application visually. That's why we test visually.

Not all users interact visually. Selecting interactive elements through accessible labels, not based on visual appearance, is a better practice imo. I want important parts of the DOM that are critical to building a correct accessibility tree to be a part of the test, and to fail the test if we change something that makes the accessibility tree incorrect. Because that is the API for assistive technology and it communicates the user interface for lots of people. "Correct behavior" of an app or website includes "the accessibility tree accurately reflects the structure and nature of the content" and "form fields are labelled correctly". I might be in the minority in thinking that, but I believe it 100%.

Nothing I've seen so far (including the post you linked) suggests that the OCR-like approach can tell us anything about the accessibility tree.

The post does make a similar point to mine:

> If your app changes visually, your test will fail. This is of course a tradeoff and a conscious decision to couple your tests to your UI instead of your code, but the upsides bring much more value than that the downsides take away.

I disagree on the tradeoff. I can run screenshot diffs etc to catch unexpected UI changes, they are a little noisy, but I'm ok with that tradeoff because I care about more than just the visual appearance of the app.

A "visually correct" app with click handlers on divs and no semantic HTML is a liability (legally, maintenance wise, etc).. I'd like the E2E testing tool to assert that the app is working correctly, which does mean some assertions about the DOM are appropriate to me. I agree with the author of the linked post that "we want a solution that is not brittle in unwanted ways." We can be selective about what DOM things are important.

In the linked post the author says "In particular, DOM tests are tightly coupled to the structure of your code." and gives an example about a Selenium test that uses a brittle xpath that depends on a specific DOM structure.

Maybe I have not been exposed to enough of the industry to know that there are thousands of setups relying on flaky xpaths to target elements for testing. To me, it is not true that DOM tests are tightly couple to the structure of your code by default. It's a false statement made for marketing purposes and it is gross.

DOM tests "can be flaky", "are sometimes coupled to DOM structure" or whatever, is a fair assertion, but flakiness in DOM-driven testing is not a fact, it's a sign of badly written DOM-based tests. This is often the first thing I address in a code review of new tests written by somebody who does not write lots of FE test code, and they easily learn how to avoid it.

Maybe I'm wrong but it seems really really basic stuff to not create brittle selectors that fail tests for reasons we don't care about.

I like the OS-level interaction and agree that provides some advantages. I totally disagree that these advantages mean your solution wins at the "best way" to test, but it does clearly cover a different surface area than other automated solutions for E2E testing, and it seems like tests are pretty quick to knock out.

This solution could be a complement to other automated E2E tests, and I would see no reason that a PM or other party couldn't spin up and maintain some tests this way as quick-to-create set of tests to run against various builds, knowing that design changes will break them but that this is OK cause in theory it is quick to rewrite them.

But I couldn't see using this tool as the only E2E testing solution as though it is a superset of what Cypress/Selenium/Whatever tests are capable of. It is actually not a competitor with those tools. It's addresses different concerns with a little bit of overlap.

I'm happy to check out the free trial and see if I'm missing something, and eat crow if I'm being unfair here.

newmnhn commented on Asking developers to do QA is broken – why anyone should own QA   rainforestqa.com/blog/acc... · Posted by u/ukd1
fredsters_s · 4 years ago
[author here] You are absolutely right: the optimal setup is a cross-functional team of domain experts collaborating on solving the customer's problem. The article is meant to point out that siloing QA to either just dev or just QA is an anti-pattern that is unstable and will not work, long term, without significant pain.

I think the challenge is that, while we agree on the optimal setup, it's almost never done like this. There's lots of reasons why, but the main one (imo) is organizational scaling. The logic of scaling teams tends towards specialization, especially because developer time is extremely expensive.

There are many ways to address the problem of QA. From our perspective, if they don't broaden the ownership of QA from just developers or just QA engineers (which is where all the current products are targeted), they will exacerbate this specialization problem.

newmnhn · 4 years ago
Hi author, I found parts of this downright wrong, especially on the Cypress side, which is where I have the most familiarity:

>Compare this to code-based automation solutions like Selenium or Cypress, where a coder would need to manually update the code across all the relevant tests any time the product changes.

... Well, no. Those tools can have reusable chunks and references that work just like your steps and are organized in the same manner, so that things used multiple places are stored once and reused. That's a basic programming good practice. When a change is needed to, say, a login flow, you don't change 100 UI tests, you change the login function that those tests are all calling.

> Tests created in code-based automation solutions like Selenium and Cypress evaluate what’s going on in the code behind the scenes of your product’s UI. That is, these solutions test what the computer sees, not what your users see.

and

> For example, if the HTML ID attribute of the signup button in the example above changes, a Selenium or Cypress coded test that identifies that button by its ID would likely break.

This is all very disingenuous in my book. In these tools the tests interact with the rendered web page and _can_ be made to use IDs, classes, and other brittle stuff as selectors, but that's a naive approach that a professional wouldn't typically use, because the brittleness surfaces early and there are better patterns that avoid it. One of those is to use selectors based on something that itself should be present - eg, click a button based on its label being "Log In". If that test fails because the button label was changed or removed, that's a reasonable failure, because labels are important in the UI. In the case where we are selecting/making assertions about DOM elements that don't have meaningful user-facing labels, dedicated test-id attributes solve the brittleness problem. But by and large, if something is interactive to the user, it should have a label, so the fallback to test attrs for selectors is rare, and used for the case where we want to measure some specific effect took place that is not itself an interactive element.

It's unfair to suggest that these tools inherently create brittle tests.

> Rainforest QA tests don’t break when there are minor, behind-the-scenes code changes that don’t change the UI.

but

> It works by pixel matching and using AI to find and interact with (click, fill, select, etc.) the correct elements.

Look, maybe your tool is GREAT, I haven't tried it. But a functional UI test based on label contents may be more robust than something that breaks when the visual structure of a page changes, which happens itself pretty frequently. Maybe the AI is good enough to know that a bunch of stuff moved around but the actual flow is the same and can find its way through. With tests based on labels and dedicated selectors, devs can make massive structural changes to the DOM and not break any tests if all the workflows are the same.

I would sure love if this post contained more info on how the visual AI system of selecting elements is better than using labels, test attributes etc as is conventional in automated testing done by professionals. Likewise it would be good to compare with an actual competitor like Ghost Inspector, where non-programmers have been able to generate step-based tests like this for years. The main gripe I had with Ghost Inspector was that it creates brittle selectors and so tests need to be changed a lot in response to DOM changes, unless a developer gets in there and manually reviews/picks better selectors.

If what you have a is a tool that _makes more robust tests than Ghost Inspector_ but is _as easy for a PM to use_, then that is interesting.

I actually support this underlying idea completely - I love systems where non-developers can create and maintain tests that reflect what they care about in the UI. I even love it when tools like this create low-quality tests that are still expressive enough that a dev can quickly come in and fix up selectors to make them more suitable. Cypress Studio is a currently-experimental feature that looks promising for this too, allowing folks to edit and create tests by clicking in the UI, not editing code files. It's a good direction for automated test frameworks to explore.

I'm just really uncomfortable after reading this post. It strays beyond typical marketing hyperbole to be actually deceptive about the nature of these other tools and the practices of teams using them. Instead of highlighting the actual uniqueness of your product, you exaggerate the benefits of this approach vs other solution. Come on, you can do tests in parallel with many tools, and you can avoid captcha for automated testing in various ways. Some of the process points you make are fair but also, again, kind of weak, because sure "QA at the end with no consultation during planning and development" is bad, but that's inherently bad for well known reasons.

What you've said is basically "our tool is better than every other idea about QA, if those ideas are deliberately implemented in the worst possible way, and our tool is implemented in the best way". Well sure. But also, of course it is.

Sorry if this seems harsh. To give you the benefit of the doubt: Marketing copy walks a fine line when trying to be persuasive and you might not have expected to create this impression. It's also possible that you did some research into weaknesses of automated test frameworks and just don't understand that those things are compensated for quite easily and routinely, because maybe you don't have the background. I don't know, but I hope future materials are a little more grounded in reality.

newmnhn commented on I will never not talk about my depression   annaschueth.com/?p=428... · Posted by u/freefrag
globular-toast · 5 years ago
OK, I wish I could just go on sick leave for 4 months due to being unable to function on a daily basis due to a medical condition.
newmnhn · 5 years ago
In a lot of places, _you can_ friend!
newmnhn commented on I will never not talk about my depression   annaschueth.com/?p=428... · Posted by u/freefrag
newmnhn · 5 years ago
Huge difference between "feeling depressed" and "being unable to function on a daily basis due to a medical condition called depression".

Sick leave is appropriate if a person is sick. Depression can take over your life and make you unable to work. If sick leave does not exist for a depressed person they either become dependent on family or just get fired, risking homelessness, credit problems, increased chances of suicide etc.

In some countries and jobs ... well, that's what happens. But some places treat sick leave differently and if a doctor says you are sick you can get a lot of paid leave in order to recover.

newmnhn commented on In Praise of the Unambiguous Click Menu   css-tricks.com/in-praise-... · Posted by u/sandebert
input_sh · 5 years ago
Let's say you sell a handful of products in a few categories. I'd rather click on the category and then the product, as opposed to the product being directly accessible behind a dropdown of a category.
newmnhn · 5 years ago
I'm not fond of big nested menus in general either, but they are good for quick exploration and can be pretty forgiving of poor categorization.

I do wonder if sometimes the nested nav is too in-between. Maybe the solution is not to try to squeeze it all into that structure but make "finding the page I want" to be a more top-level experience. EG don't take me to a Category Page, but do let me select a category and start drilling down, whilst keeping it easy to switch between top level categories.

Big nested navs are often just ... fiddly.

newmnhn commented on Coca-Cola says 'Be Less White' learning plan was about workplace inclusion   newsweek.com/coca-cola-fa... · Posted by u/sn_master
zozbot234 · 5 years ago
> "White" as an idea to describe a group of (roughly) light skinned European people, came about in order to justify enslaving and subjugating other groups. ...

This is flat wrong. For better or for worse, the modern "White" identity in the U.S. was heavily promoted by late-19th-c. and early 20th-c. Progressives so that light-skinned Europeans would stop trying to oppress and subjugate one another over their national identity. (To be sure, back in the day, these folks did not care all that much about whether other racialized groups got oppressed; they were quite big on "eugenics" for these groups, for example.)

I'm quite ready to admit that this was probably not an altogether foolproof idea, but now we get to live with the results - millions of people in the U.S. treat "white" as a deep part of their identity, no different than being, e.g, "Irish" for others. Many of them would likely take some offense at being told that they should "be less white", or that they need to denounce their white identity in order to "be less arrogant" and the like. Being in denial about how divisive these racially-connoted messages are is just not productive.

newmnhn · 5 years ago
I agree I was wrong, there's another reply to me that's a lot more coherent about what I was going for. I do think it's important to still understand and confront the problems of whiteness as an identity head on.

> Being in denial about how divisive these racially-connoted messages are is just not productive.

I don't think it's denial, I think it's strategic choice made in the full knowledge of the offense and discomfort it might provoke. There's definitely part of messages like "whiteness is racist" or "be less white" that ii ... intended to generate offense & reflection and is a valid way of getting the work done. Being polite and working within the status quo can be seen to upload the status quo, and hasn't seemed to work at actually making chaneg. Sometimes to cut through people choose to say very challenging things. I'm personally fine with that, and even if I'm not I don't think it's up to me to tell the people affected by white supremacist ideas how to go about their business.

newmnhn commented on Coca-Cola says 'Be Less White' learning plan was about workplace inclusion   newsweek.com/coca-cola-fa... · Posted by u/sn_master
dragonwriter · 5 years ago
> "White" isn't a racial group.

Yes it is.

> "White" as an idea to describe a group of (roughly) light skinned European people, came about in order to justify enslaving and subjugating other groups.

That's where the entire idea of distinct human “races" came about, and “white” was a pretty constant part of such taxonomies.

> Before, say, about 400 years ago, whiteness was not an idea used to identify a "race" of people.

Human “race" as a coherent, formalized idea is less than 400 years old.

Note that I'm not disagreeing at all with your idea of the role of whiteness, only with the idea that this somehow divorces it from, rather than grounds it firmly in, the idea of human “races”.

All modern concepts of race are artifacts of attempts to justify racial, and specifically almost entirely white, supremacy. The difference between them is that that basis has led to them becoming also groups of shared experience: largely, except for the white group, this is about the shared experience of being subjected to white supremacy, but for the white group it is the shared experience of benefitting from it.

newmnhn · 5 years ago
I think this is a better way to put all of that than what I said, thanks.
newmnhn commented on Coca-Cola says 'Be Less White' learning plan was about workplace inclusion   newsweek.com/coca-cola-fa... · Posted by u/sn_master
rayiner · 5 years ago
> "White" isn't a racial group.

I understand the academic underpinnings of that idea, but that's not how normal people understand the term "white." The Bureau of the Census, for example, certainly appears the believe that "white" reflects a racial category: https://www.census.gov/topics/population/race/about.html.

newmnhn · 5 years ago
Sure, but the history of the term matters in this context & maybe should be taught a little more. Like when we grow up these days, we sorta get the idea that White or Black are these inherent traits that people naturally have and have always had.

We rarely get the chance to see that the idea of whiteness comes from a need of protecting an in-group from exploitation, while excusing and justifying the exploitation of outsiders to that group.

The census is an interesting example because for the first 70 years or so, starting in 1790 the US census had just 3 "race/ethnicity" categories. You could be "Free white male/Free white female", "All other free person" or "Slave". Which is part of the reason for creating the category of whiteness. There's also some really gross stuff right through the 1800s where the census was tracking people with various percentages of "black blood".

https://www.pewresearch.org/interactives/what-census-calls-u...

I suppose I'm just saying that the census, as part of the machinery used to implement and maintain white supremacy, is not necessarily the best authority on race.

newmnhn commented on Coca-Cola says 'Be Less White' learning plan was about workplace inclusion   newsweek.com/coca-cola-fa... · Posted by u/sn_master
treeman79 · 5 years ago
Insulting and demeaning racial groups is the opposite of inclusion. It breeds resentment and hatred. For a time there was a focus on treating people as human and not as [racial/sex/religion]

Trend these days is to encourage openly being a bigot, just as long as it’s against certain people.

Replace the word white with any other social group and perhaps you’ll see the problem.

newmnhn · 5 years ago
"White" isn't a racial group. "White" as an idea to describe a group of (roughly) light skinned European people, came about in order to justify enslaving and subjugating other groups. Various groups worked their way into being considered white over time, in part by contributing to the subjugation of others. And various groups once considered white, later were not considered so.

"White" as what you call a "social group" was created in service of this power dynamic. Before, say, about 400 years ago, whiteness was not an idea used to identify a "race" of people.

So yeah, I'm all for being less white. I'm fine with just being like ... Irish.

You can research the history on this pretty easily, but a good place to start is a podcast series from Scene On Radio called Seeing White. My memory is a little fuzzy but I think the broad outline is correct.

newmnhn commented on Why I Love Tailwind   mxstbr.com/thoughts/tailw... · Posted by u/0xedb
stanmancan · 5 years ago
Interesting thanks! Wouldn’t this only be a benefit for the very first request when it has to download the css file? Seems like including online styles would increase the page size of every page, on every load, versus a one time delay downloading the css?
newmnhn · 5 years ago
The problem is partly that page speed measurement tools care a lot about that first load. Even if everything after that is super snappy due to cached resources, if you are only using 5% of the total CSS file in the first page the user hits, that other 95% is dragging down the experience on first load, and especially dragging down lighthouse scores.

It doesn't mean though, that you can't have a combined approach where a small amount of genuinely global CSS is loaded from an external file that is cached, while component-specific CSS lives in the component and renders inline with it. But then it's like ... why do that extra request if the file is that small, and you end up with inline everything.

Definitely the trend from a business point of view is to optimize for good perf scores on lighthouse, even if that's a little illogical at times.

Another thing though is that often the JS for whole chunks of a page (which contains the CSS) can be code-split and cached as its own file, so whole components made up of HTML CSS and JS can be lazy loaded and if that same chunk of stuff is needed again, it could be a cached JS file.

Especially if these are "below the fold" and pulled in as the user scrolls or something, you get a small initial payload + small JS files being called in to run as needed.

I don't know how many implementations there are of this in the wild, but it's possible.

u/newmnhn

KarmaCake day9May 28, 2020View Original