How we test the TeamCity UI
blog.jetbrains.com
blog.jetbrains.com
BUT TeamCity UX is the worst UI from all CI systems that I have used. From first version of Jenkis to managed stuff like CircleCI. People hate is so much that someone added a Slack icon :teamshitty: at work.
I pretty much use Gitlab CI these days for anything outside my day job though, and the stuff at work is all Azure Pipelines (via Azure DevOps) now.
At work we're experiencing several issues with triggers that don't kickoff when there are changes in the repo. Builds stuck for 2 hours or more on "Collecting changes". Builds that build from the default branch, even though they were called with a specific branch to build from. I could go on.
Also, with Jenkins you're forced to use groovy for pipeline code :/...
Someone else mentioned groovy with a frown face, but tbh I much preferred writing all jobs in JobDSL, rather than in the Jenkins UI.
So yeah perhaps they'd have done the new experimental UI in one fell swoop if they had less testing, who knows. But I'd rather they have a well tested product than ultra-fast UI replacement.
Sure, TC has had issues (especially when it came to scaling), but they fixed a lot of those and honestly, it's doing well now.
Issues usually came from people who didn't know how to make robust pipelines or leverage TC's functionality and felt like they had to reinvent everything. And that was in a company with thousands of employees, thousands of TC configurations and hundreds of agents.
>Issues usually came from people who didn't know how to make robust pipelines or leverage TC's functionality and felt like they had to reinvent everything
Blaming the end user is almost never the answer, even less when the average TC user is somewhat technical or very technical. If a tool throws hundreds of things to your face and call it a day, then people will end up reinventing everything since they didn't have a chance to discover how to make sense out of it (without tons of free time and guessing that is). I haven't used the very latest version though so things may have improved further but I believe it'd require a major overhaul to put things in order.
If people try to reimplement things in arbitrary broken shells scripts (the user issues) that can't be run locally, then it's not the CI tool's responsibility either.
I've seen this happen a bunch of times, and when investigated the opinions are often not based on much thought, or are actually flat out wrong.
My company has just migrated from TC to Jenkins except for the project I run, which is still on TC. Why? Because I've actually read the TC user guide and so understand how it works, what it can do. Plus I like the GUI.
The justification for migration was idiotic, something like "Jenkins has a big community, look at how many plugins there are". Well guess what - Jenkins has more plugins than TC because it needs more to match the feature set. A lot of things that are built in with TC are unmaintained crappy plugins in Jenkins that you have to assemble yourself.
The other day I saw one of the instigators of this migration complaining on Slack that the build queue priorities plugin they were using had gone unmaintained and had serious bugs. Build queue priorities are built in to TC for a long time and JetBrains doesn't ship broken features very often, so my guess is it works. I had to resist engaging in a told-you-so moment ... why bother, the damage was done already.
In another case another senior guy decided on nearly his first week that a major piece of software we use sucks. For years he has constantly made claims of the form "$PRODUCT can't do X" or "feature Y is broken" and when the user guide is checked, in fact it can do X and when asked what is broken about feature Y he can't point to any actual concrete bug reports he can or will file. But nothing will shake his view on this and other junior devs pick it up and echo it to make themselves seem discerning and informed.
Time and time again I've seen stupid product choices in companies done for no better reason than someone formed a snap opinion without bothering to read the user guide. TC works great. It's one of the best CI systems out there. Spend an afternoon reading the user manual from cover to cover and it will pay huge dividends - also note that it's free if you only need 3 agents.
Jenkins seems to suffer from too many cooks/anything goes mentality. It's clearly not well focused. It's feels like a handful of pet-projects lumped into one umbrella.
When it comes to functionality, TeamCity is constantly improving and innovating.
Based on the OP, I suspect their experience is with an old version or maybe misused or misconfigured.
At first, I thought TeamCity's UI was batshit crazy. In retrospect, I think it was just that it's not organized at all like Jenkins is, and I needed to re-adjust my mental model for how the build server should work. Or something like that. All I know is that, at some point along the way, I came to use TeamCity to automate more things, while still spending less time futzing with it than I did with Jenkins.
That said, I feel like TeamCity is also distressingly full of partially implemented features and flaky UX. It's just that its warts tend to accumulate on the periphery, rather than directly between me and the thing I'm trying to get accomplished before I can go home.
So, I think it's about mental model as you wrote, plus where your techstack is in terms of unification (containerization helps there tremendously).
> Here, we change the engine type from turbofan to propfan. Just to test how it works. Since the new engine no longer matches our snapshot, the test fails. We’ve got a report, and our engineers are on their way to investigate the problem.
I would be really happy if I know that the onboard computer has tests that checks if the engine being used is compatible before it takes off.
IMO, tests in general should be as close as possible to the real use-case ( kudos for the screenshot testing ) and as far as possible from the implementation. What happens with snapshots is that you are bound to the implementation. Maybe I have a logic somewhere in my code that does s/propfan/turbofan/. Would a user be interested in that or the functionality itself?
We ditched all JEST's snapshots statements in our code-base, because of code-coverage abuse and false sense of "being safe" just a couple of months ago. It was a good decision that helped us be closer to "what the user sees" rather than "what the markup should be"
Also, I am sure this will be pointed out several times, but snapshot testing doesn't seem like a great idea. Your test is wrapped totally around your implementation and it is kind of unclear what you are testing i.e. change something, run test, snapshot fails because of UI update, update snapshot, passes...if you introduce some kind of unexpected bug with that change, how do you know? It works if you are testing for the same result but if you are making changes to the snapshot, you lose all coverage...tests are just as important then too.
Tbf, you usually end up wrapped around your implementation anyway (i.e. checking to see if there is a button that has certain text) but I feel that snapshots are a bit shortcut-y and give false confidence.
Surely the point of UI tests is to really test the functionality from the point of view of the user...I don't think snapshots achieve this (and I have always got in trouble when I strayed away from this principle...personally).
All that is to say, I like snapshot tests. Snapshot tests can be created and updated automatically, basically making their dev cost close to 0. They are so cheap that they don't actually have to catch a lot of bugs for them to be a net positive.
> the UI is changing all of the time
Far from an expert in UI tests, but I’m not sure the former is possible given the latter.
> it'd be a nightmare to maintain UI tests at this stage.
IMO that is likely.
Snapshots of the intermediate representation (e.g. JSX in React) will be less brittle than e.g. a screenshot of pixels. It also works best when your UI is a function of some easily-constructed state. Other frameworks sharing these features would also work well with snapshot testing.
Chromatic generates screenshots from component stories for visual change detection with an easy to use and share web UI. It's neat.
[1] https://storybook.js.org [2] https://storybook.js.org/docs/testing/structural-testing/ [3] https://www.chromatic.com
They don't say how they measure "issues" in their chart, but if it's through CI failures, it seems likely that "Linters / Unit / Render tests" catch fewer issues because developers run them locally before pushing code.
I’m intrigued by screenshot testing but can it work across all screen sizes, from iPhone 6 to XR to iPad, and work in all orientations?
Otherwise my problems are that our designer made tap pinned too small in a couple places without anyone noticing. Or that something isn’t perfectly aligned or a line separator isn’t long enough, etc. they always seem to require a human to use it and say, I don’t like this or this could be better.
https://userdashboard.github.io/dashboard-sitemap
These screenshots are generated from the test suite for all my UI tests. I have puppeteer navigate a series of steps and save each screenshot, resizing to mobile resolutions. This is done in Chrome, Puppeteer also supports Firefox. The screenshots are then integrated with my documentation both as sitemaps like above and to demonstrate usage:
https://userdashboard.github.io/administrator/reset-codes
They are generated from a simple sequence of steps added to my tests, which can run with or without saving/generating the screenshots:
req1.screenshots = [
{ hover: '#administrator-menu-container' },
{ click: '/administrator' },
{ click: '/administrator/accounts' },
{ click: `/administrator/account?accountid=${user.account.accountid}` },
{ click: `/administrator/account-reset-codes?accountid=${user.account.accountid}` }
]
The code for parsing those steps into Puppeteer actions is available here: https://github.com/userdashboard/dashboard/blob/master/test-...In addition to being user-friendly for documentation there is tremendous QA opportunity to being able to observe every page at every resolution. Everything required better code too, you cannot forget to link to a page or have some part of the navigated route not working or have anything going wrong anywhere.
I am finalizing localization so in the next week or so the documentation will also be able to switch between any combination of language and device.
Note: some of my documentation/screenshots hasn't generated yet