Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "tests? what tests?"
-
1. Buy boxes of orange juice, almost past their expiry date.
2. Put boxes on the hot office windowsill for a few weeks.
3. Cool down juice in fridge.
4. "Hey dear coworker, would you like a refreshing juice box on this hot spring day?"
5. Watch coworker retch and vomit, spitting blue-grayish juice over his desk, crying: "Why would you give me old moldy juice without checking the date?"
6. "Do you remember when you told me you didn't have time for unit tests? THIS IS WHAT HAPPENS, DAVE, THIS IS WHAT FUCKING HAPPENS WHEN YOU DEPLOY UNTESTED CODE.... NOW FINISH YOUR JUICE!"32 -
Boss: "I looked at a testing suite. It is $2,500 a license and I'm buying 60 licenses. You should probably get familiar with it."
LeadDev: "Um, we already use NUnit, and it's free."
Boss: "Hmm...I'd better add Pluralsight training in the budget so you can learn about the new program."
LeadDev: "Oh, no...we need new laptops more than we need software."
Boss:"New laptops? Not my budget. When we buy this new software, everyone is going to use it"
LeadDev: "Everyone? How will you monitor it's usage?"
Boss: "I'll have networking send me captures of all the running tasks on the dev machines. The test suite better be running. Writing good tests will be our #1 priority."
LeadDev: "Um, we already write tests using NUnit."
Boss: "I don't understand what you are saying. I need something I can visualize. This UI testing suite is exactly what I need."
LeadDev: "Maybe the testing suite would be better suited for you and QA?"
<click..click>
Boss: "Submitted the budget. There will be a test server available for you to configure. This whole project costs over $100,000, so don't screw it up. Any questions?"
LeadDev: "Oh...well...what server ..."
Boss: "Dang...sorry, I'm taking off the rest of the afternoon. We'll talk about this more on Monday. Get started on those Pluralsight videos. I'll expect a full training and deployments by next week. Have a great weekend!"13 -
After listening to two of our senior devs play ping pong with a new member of our team for TWO DAYS!
DevA: "Try this.."
Junior: "Didn't work"
DevB: "Try that .."
Junior: "Still not working"
I ask..
Me:"What is the problem?"
Few ums...uhs..awkward seconds of silence
Junior: "App is really slow. Takes several seconds to launch and searching either crashes or takes a really long time."
DevA: "We've isolated the issue with Entity Framework. That application was written back when we used VS2010. Since that application isn't used very often, no one has had to update it since."
DevB: "Weird part is the app takes up over 3 gigs of ram. Its obviously a caching issue. We might have to open up a ticket with Microsoft."
Me: "Or remove EF and use ADO."
DevB: "That would be way too much work. The app is supposed to be fully deprecated and replaced this year."
Me: "Three of you for the past two days seems like a lot of work. If EF is the problem, you remove EF."
DevA: "The solution is way too complicated for that. There are 5 projects and 3 of those have circular dependencies. Its a mess."
DevB: "No fracking kidding...if it were written correctly the first time. There aren't even any fracking tests."
Me:"Pretty sure there are only two tables involved, maybe 3 stored procedures. A simple CRUD app like this should be fairly straight forward."
DevB: "Can't re-write the application, company won't allow it. A redesign of this magnitute could take months. If we can't fix the LINQ query, we'll going to have the DBAs change the structures to make the application faster. I don't see any other way."
Holy frack...he didn't just say that.
Over my lunch hour, I strip down the WPF application to the basics (too much to write about, but the included projects only had one or two files), and created an integration test for refactoring the data access to use ADO. After all the tests and EF removed, the app starts up instantly and searches are also instant. Didn't click through all the UI, but the basics worked.
Sat with Junior, pointed out my changes (the 'why' behind the 'what') ...and he how he could write unit tests around the ViewModel behavior in the UI (and making any changes to the data access as needed).
Today's standup:
Junior: "Employee app is fixed. Had some help removing Entity Framework and how it starts up fast and and searches are instant. Going to write unit tests today to verify the UI behaivor. I'll be able to deploy the application tomorrow."
DevA: "What?! No way! You did all that yesterday?"
Me: "I removed the Entity Framework over my lunch hour. Like I said, its basic CRUD and mostly in stored procedures. All the data points are covered by integration tests, but didn't have time for the unit tests. It's likely I broke some UI behavior, but the unit tests should catch those."
DevB: "I was going to do that today. I knew taking out Entity Framework wouldn't be a big deal."
Holy fracking frack. You fracking lying SOB. Deeeep breath...ahhh...thanks devRant. Flame thrower event diverted.13 -
One of my worst meetings, as the sheer rage was unbelievable.
Backstory:
Architect: "Stop duplicating code", "stop copy pasting code", "We need to reuse code more", "We need to look at a new pattern for unit tests" etc.
Meeting:
Architect: What did you want to talk about?
Me: I built a really simple lightweight library to solve a lot of our problems. Its built to make unit testing our code much easier, devs only need to change a small bit of how they work.
Architect: I like the pattern a lot, looks great ... but why a library? can we not just copy the code from project to project?
... do you have a twin or something?2 -
Dev: "Ah, I finally fixed that code I was working on the other day and got it pushed to staging!"
Almond: "Ah, great! What was the issue in the end?"
Dev: "It was an odd one - it wasn't actually my code that was the issue, there was a bunch of other code getting in the way."
Almond: "How do you mean?"
Dev: "It kept complaining about something called a "unit test" failing - so after a while I found the right unit tests, deleted them, and now it works great!"
Almond: "..."11 -
I delivered a small C# program long time ago.
Unit tests, integrations tests, functional tests, all passing (users even happy).
Colleague of mine approached me.
C: "I finally fixed the program"
M: "Which program?"
C: "Product X"
M: "What was wrong with it?"
C: "Nothing, but now it runs on Python"
M: "..."
C: "Yeah, we lost a few features, but it's Python!"
M: "Aren't you busy with other things?"
C: "That can wait"
M: "..."
M: "..."17 -
Testivus On Test Coverage
Early one morning, a programmer asked the great master:
“I am ready to write some unit tests. What code coverage should I aim for?”
The great master replied:
“Don’t worry about coverage, just write some good tests.”
The programmer smiled, bowed, and left.
...
Later that day, a second programmer asked the same question.
The great master pointed at a pot of boiling water and said:
“How many grains of rice should I put in that pot?”
The programmer, looking puzzled, replied:
“How can I possibly tell you? It depends on how many people you need to feed, how hungry they are, what other food you are serving, how much rice you have available, and so on.”
“Exactly,” said the great master.
The second programmer smiled, bowed, and left.
...
Toward the end of the day, a third programmer came and asked the same question about code coverage.
“Eighty percent and no less!” Replied the master in a stern voice, pounding his fist on the table.
The third programmer smiled, bowed, and left.
...
After this last reply, a young apprentice approached the great master:
“Great master, today I overheard you answer the same question about code coverage with three different answers. Why?”
The great master stood up from his chair:
“Come get some fresh tea with me and let’s talk about it.”
After they filled their cups with smoking hot green tea, the great master began to answer:
“The first programmer is new and just getting started with testing. Right now he has a lot of code and no tests. He has a long way to go; focusing on code coverage at this time would be depressing and quite useless. He’s better off just getting used to writing and running some tests. He can worry about coverage later.”
“The second programmer, on the other hand, is quite experience both at programming and testing. When I replied by asking her how many grains of rice I should put in a pot, I helped her realize that the amount of testing necessary depends on a number of factors, and she knows those factors better than I do – it’s her code after all. There is no single, simple, answer, and she’s smart enough to handle the truth and work with that.”
“I see,” said the young apprentice, “but if there is no single simple answer, then why did you answer the third programmer ‘Eighty percent and no less’?”
The great master laughed so hard and loud that his belly, evidence that he drank more than just green tea, flopped up and down.
“The third programmer wants only simple answers – even when there are no simple answers … and then does not follow them anyway.”
The young apprentice and the grizzled great master finished drinking their tea in contemplative silence.
Found on stack overflow https://stackoverflow.com/questions...8 -
New senior dev joined the project today.
Senior dev: "There's no way for me to test my changes before I merge this into develop"
Me: "Can you at least run our test suite?"
An hour later the develop branch is fucked and everyone who has merged it locally has pages of red errors splattered across their screens whenever they run any tests.
Start looking into what the fuck is going on.
Notice that all the errors are related to changes the new guy made.
Ask him if he ran the tests..
Senior dev: "Nah they wouldn't catch anything locally "
Stare at the stream of red text running down my screen.
Normally I wouldn't care but we were trying to prepare a release... RUN THE FUCKING TESTS ASSHOLE.9 -
Had a PR blocked yesterday. Oh god, have I introduced a memory leak? Have I not added unit tests? Is there a bug? What horrible thing have I unknowingly done?
... added comments to some code.
Yep apparently “our code needs to be readable without comments, please remove them”.
Time to move on, no signs of intelligent life here.39 -
Client: so how could we test this 😬
Me: you know what, send me an email at linuxxx@companyname.com and I can look if I can properly reply! Keep in mind though that this is for one time only, no further questions through that email address!
Client: Yes of course! *sends email*
Me: *tests* - *works fine* - *messages client back through the ticket system*
Client: *proceeds to send two follow up questions to my fucking work email address*
Me: *selects emails* - *marks emails as spam and deletes them*
Fucking seriously?! Cunt.18 -
Summing up many ridiculous meetings I've been in.
Many years ago we hired someone for HR that came from a large fortune 500 company, really big deal at the time.
Over the next 6 months, she scheduled weekly to bi-weekly, 1 to 2 hour meetings with *everyone* throughout the day. Meeting topics included 'How to better yourself', 'Trust the winner inside you'...you get the idea.
One 2-hour meeting involved taking a personality test. Her big plan was to force everyone to take the test, and weed out anyone who didn't fit the 'company culture'. Whatever that meant.
Knowing the game being played, several of us answered in the most introverted, border-line sociopath, 'leave me the frack alone!' way we could.
When she got the test results back, she called an 'emergency' meeting with all the devs and the VP of IS, deeply concerned about our fit in the company.
HR: "These tests results were very disturbing, but don't worry, none of you are being fired today. Together, we can work as team to bring you up to our standards. Any questions before we begin?"
Me: "Not a question, just a comment about the ABC personality test you used."
<she was a bit shocked I knew the name of the test because it was anonymized on the site and written portion>
Me: "That test was discredited 5 years ago and a few company's sued because the test could be used to discriminate against a certain demographic. It is still used in psychology, but along with other personality tests. The test is not a one-size-fits-all."
VP, in the front row, looked back at me, then at her.
HR: "Well....um...uh...um...We're not using the test that way. No one is getting fired."
DevA: "Then why are we here?"
DevB:"What was the point of the test? I don't understand?"
HR: "No, no...you don't understand...that wasn't the point at all, I'm sorry, this is getting blown out of proportion."
VP: "What is getting blown out of proportion? Now I'm confused. I think we all need some cooling off. Guys, head back to the office and let me figure out the next course of action."
She was fired about two weeks later. Any/all documentation relating to the tests were deleted from the server.16 -
Doot doot.
My day: Eight lines of refactoring around a 10-character fix for a minor production issue. Some tests. Lots of bloody phone calls and conference calls filled with me laughing and getting talked over. Why? Read on.
My boss's day: Trying very very hard to pin random shit on me (and failing because I'm awesome and fuck him). Six hours of drama and freaking out and chewing and yelling that the whole system is broken because of that minor issue. No reading, lots of misunderstanding, lots of panic. Three-way called me specifically to bitch out another coworker in front of me. (Coworker wasn't really in the wrong.) Called a contractor to his house for testing. Finally learned that everything works perfectly in QA (duh, I fixed it hours ago). Desperately waited for me to push to prod. Didn't care enough to do production tests afterwards.
My day afterwards: hey, this Cloudinary transform feature sounds fun! Oh look, I'm done already. Boo. Ask boss for update. Tests still aren't finished. Okay, whatever. Time for bed.
what a joke.
Oh, I talked to the accountant after all of this bullshit happened. Apparently everyone that has quit in the last six years has done so specifically because of the boss. Every. single. person.
I told him it was going to happen again.
I also told him the boss is a druggie with a taste for psychedelics. (It came up in conversation. Absolutely true, too.) It's hilarious because the company lawyer is the accountant's brother.
So stupid.18 -
Looks like I'm getting fired on Wednesday :)
Long story:
*I add first unit tests to project.
*Boss adds new functionality and breaks all the tests so I can't compile and write more for what I'm working on.
*Boss is very fragile and cannot handle any comment that can possibly be taken as a slight against him.
Me: "I wanted to ask what our policy on unit tests is please? Because we haven't really said how we are treating unit tests, and everyone myself included is not thinking about them. I also haven't added tests when I fixed bugs and this time your changes broke the tests"
Boss 10 minutes later: "I want to speak to you in private".
Boss: "you are too forceful and direct. You said I should have added tests."
Me: "yeah but I didn't mean in a nasty way"
Boss getting louder and more aggressive: "You are too forceful"
Me: "I didn't mean it in a bad way"
Boss: "I didn't want to add tests for that!"
Me: "then why add any tests?"
Boss: "Fine we are not having this conversation now!"
*Boss storms out
I decided I can't speak to the guy about anything without upsetting him spoke to the manager before I quit because I can't work like this.
That resulted in a meeting with my boss, his boss and the head of HR where I ended up savaging him and told them I can't bring up anything as I can never tell if it will offend him and that I spend ages writing emails and trying to document communications because I just can never tell if I will upset him. Also that I cannot bring up any ideas because I can't tell if he will somehow get offended and that I can't even write code because if I change something he wrote at some point he will get angry.
My boss claims that I am extremely forceful and disrespectful and that I am constantly insulting him and his decisions.
We go back over a ton of shit and I refute everything he says. In the end I have to have a meeting with him on Wednesday where we either get things straight, he fires me or I quit.
I think at this point that our relationship is too fucked for him to be my team lead on a 6 man team.
Side note I keep bringing forth ideas because we have one database shared between 6 Devs, no pull requests (apart from mine and another new guy), no test driven development, no backlog, no team driven story pointing, no running tests before merging, no continuous integration setup, no integration tests, no build step on merge, no idea of if we are on track to our deadline other than his gut feeling, no actual unit tests backend - just integration with a test db, no enthusiasm to learn in the team and no hope.21 -
Newspaper: This CEO is one of the top entrepreneurs in the country, a true tech visionary shaping the future.
--- 3 months previous ---
Lead dev: O2 have said they are will pre-install the app on all their Androids but they need documentation from us.
CEO: documentation? on what?
Lead dev: Our unit test coverage, bugs found / fixed, security scan results, performance assessment, if and where its storing any data etc.
CEO: Ah were not doing any of that crap, bloody unit tests, its not necessary, tell them no.
lead dev: ..... eh ok
O2: *approved*
... true visionary, well done to everyone involved.3 -
At one of my former jobs, I had a four-day-week. I remember once being called on my free Friday by an agitated colleague of mine arguing that I crashed the entire application on the staging environment and I shall fix it that very day.
I refused. It was my free day after all and I had made plans. Yet I told him: OK, I take a look at it in Sunday and see what all the fuzz is all about. Because I honestly could fathom what big issue I could have caused.
On that Sunday, I realized that the feature I implemented worked as expected. And it took me two minutes to realize the problem: It was a minor thing, as it so often is: If the user was not logged in, instead of a user object, null got passed somewhere and boom -- 500 error screen. Some older feature broke due to some of my changes and I never noticed it as while I was developing I was always in a logged in state and I never bothered to test that feature as I assumed it working. Only my boss was not logged in when testing on the stage environment, and so he ran into it.
So what really pushed my buttons was:
It was not a bug. It was a regression.
Why is that distinction important?
My boss tried to guilt me into admitting that I did not deliver quality software. Yet he was the one explicitly forbidding me to write tests for that software. Well, this is what you get then! You pay in the long run by strange bugs, hotfixes, and annoyed developers. I salute you! :/
Yet I did not fix the bug right away. I could have. It would have just taken me just another two minutes again. Yet for once, instead of doing it quickly, I did it right: I, albeit unfamiliar with writing tests, searched for a way to write a test for that case. It came not easy for me as I was not accustomed to writing tests, and the solution I came up with a functional test not that ideal, as it required certain content to be in the database. But in the end, it worked good enough: I had a failing test. And then I made it pass again. That made the whole ordeal worthwhile to me. (Also the realization that that very Sunday, alone in that office, was one of the most productive since a long while really made me reflect my job choice.)
At the following Monday I just entered the office for the stand-up to declare that I fixed the regression and that I won't take responsibility for that crash on the staging environment. If you don't let me write test, don't expect me to test the entire application again and again. I don't want to ensure that the existing software doesn't break. That's what tests are for. Don't try to blame me for not having tests on critical infrastructure. And that's all I did on Monday. I have a policy to not do long hours, and when I do due to an "emergency", I will get my free time back another day. And so I went home that Monday right after the stand-up.
Do I even need to spell it out that I made a requirement for my next job to have a culture that requires testing? I did, and never looked back and I grew a lot as a developer.
I have familiarized myself with both the wonderful world of unit and acceptance testing. And deploying suddenly becomes cheap and easy. Sure, there sometimes are problems. But almost always they are related to infrastructure and not the underlying code base. (And yeah, sometimes you have randomly failing tests, but that's for another rant.)9 -
My favorite kind of interview question/challenge is anything that is highly practical for the job. At the current company I work, the coding test/interview challenge was to design and implement an API very similar to the core functionality of the actual product. It’s fair, tests for skills relevant to the job, and is much better than irrelevant silly brain teasers and cs questions, I feel.
In terms of specific questions, one of my favorites is one that one of my colleagues suggested I ask to potential candidates: describe what you think your biggest failed project/task was in your engineering career, and what happened/what you learned. I think it’s a good reflective question that can tell a lot about someone.3 -
So what does everyone think about unit tests, do you do it?
My own experience is I've seen people on my current team disable failing tests...12 -
Me: *Installs travis*
Dev: oh what's travis?
Me: it's a continuous integration tool I wanna setup.
Dev: ... contin.... ?
Me: continuous integration, a tool that performs builds.
Dev: ah!, is it the new version of that deprecated tool we were using "client access"?
Me: ... no ... that's an authentication service that generates and stores oauth tokens. This is the continuous integration tool I told you about yesterday (and last week and the week before).
Dev: ... contin....
Me: ... con ........ continuous integration. It listens to branches on GitHub, downloads, builds, tests and then deploys the code.
Dev: ah ok ok, cool.
I would bet my monthly fucking salary he can not repeat what I said, tell me what oauth is, or explain what he's working on at the minute.
Jesus at this rate I'd bet my salary he can't tell me my name.7 -
"Can you work on this ticket? It's kind of urgent."
-- "OK"
"And could you please not refactor? Just get this done."
-- "Why? What's the issue?"
"The logic is complex. We should not break it."
-- "Erm, that's what the tests are for. So yes, if the need arises, I'll refactor. The tests are my guidelines if the logic breaks or not."
There's a reason we create tests. So let's not hinder code base improvements by some random fear that stuff might break.
If breaks due to refactoring, we'll fix it by adding a valid test case during and then fixing the bug.
If my refactoring does not break the tests, I'll assume the code base is stable.
If your code is untested, then we have a complete different problem.3 -
Manager: Hey how come you left so many comments on my PR?
Dev: Well you’ve just recently learned how to code so there’s going to be a lot of things to learn beyond what you’ve picked up in your online coding tutorials. Don’t worry it’s only minor things like you put everything all in one function, left outdated comments in the code, have if statements 4 levels deep, have a console.log after every line of code some of which log .env variables, skipped error handling, cast to “any” a bunch instead of using more specific types, didn’t write any tests and some unrelated tests are now failing due to a circular dependancy.
Manager: THAT IS SO DISRESPECTFUL!!APPROVE MY PR IMMEDIATELY. IT WASN’T EVEN EASY FOR ME TO CREATE THE PR, NOW I HAVE TO MAKE AN UPDATE!? YOU’RE THE DEV, YOU SHOULD FIX IT NOT ME!! NEVER COMMENT ON ANY OF MY PRS AGAIN.10 -
I'm convinced code addiction is a real problem and can lead to mental illness.
Dev: "Thanks for helping me with the splunk API. Already spent two weeks and was spinning my wheels."
Me: "I sent you the example over a month ago, I guess you could have used it to save time."
Dev: "I didn't understand it. I tried getting help from NetworkAdmin-Dan, SystemAdmin-Jake, they didn't understand what you sent me either."
Me: "I thought it was pretty simple. Pass it a query, get results back. That's it"
Dev: "The results were not in a standard JSON format. I was so confused."
Me: "Yea, it's sort-of JSON. Splunk streams the result as individual JSON records. You only have to deserialize each record into your object. I sent you the code sample."
Dev: "Your code didn't work. Dan and Jake were confused too. The data I have to process uses a very different result set. I guess I could have used it if you wrote the class more generically and had unit tests."
<oh frack...he's been going behind my back and telling people smack about my code again>
Me: "My code wouldn't have worked for you, because I'm serializing the objects I need and I do have unit tests, but they are only for the internal logic."
Dev:"I don't know, it confused me. Once I figured out the JSON problem and wrote unit tests, I really started to make progress. I used a tuple for this ... functional parameters for that...added a custom event for ... Took me a few weeks, but it's all covered by unit tests."
Me: "Wow. The way you explained the project was; get data from splunk and populate data in SQLServer. With the code I sent you, sounded like a 15 minute project."
Dev: "Oooh nooo...its waaay more complicated than that. I have this very complex splunk query, which I don't understand, and then I have to perform all this parsing, update a database...which I have no idea how it works. Its really...really complicated."
Me: "The splunk query returns what..4 fields...and DBA-Joe provided the upsert stored procedure..sounds like a 15 minute project."
Dev: "Maybe for you...we're all not super geniuses that crank out code. I hope to be at your level some day."
<frack you ... condescending a-hole ...you've got the same seniority here as I do>
Me: "No seriously, the code I sent would have got you 90% done. Write your deserializer for those 4 fields, execute the stored procedure, and call it a day. I don't think the effort justifies the outcome. Isn't the data for a report they'll only run every few months?"
Dev: "Yea, but Mgr-Nick wanted unit tests and I have to follow orders. I tried to explain the situation, but you know how he is."
<fracking liar..Nick doesn't know the difference between a unit test and breathalyzer test. I know exactly what you told Nick>
Dev: "Thanks again for your help. Gotta get back to it. I put a due date of April for this project and time's running out."
APRIL?!! Good Lord he's going to drag this intern-level project for another month!
After he left, I dug around and found the splunk query, the upsert stored proc, and yep, in about 15 minutes I was done.1 -
* Updates and adds unit tests *
* Runs unit tests *
* All tests pass *
What the fuck? I'm not THAT good to write tests that pass on the first iteration.
* Runs unit tests *
* All tests pass *
Someting's not right here.
* Checks terminal *
FUCK I'm in the wrong project folder2 -
Every 2 months without fail:
Manager: I don’t understand what the point of writing tests is. They only ever pass and when they fail we just fix them so they pass again! It’s completely redundant!!! An exercise in absolute futility!
Dev: …19 -
Always deliver the goods.
Even if who you work for are idiots, and the product is useless. You never know who will see what you've done.
- I did a six-month underpaid project for ShittyCompany.
- Strived to write it nice and clean with unit tests and good(barely) documentation.
- Got a call up a year later from a consultancy company who integrated with the application I wrote. Now I work for them, and it's as close to my dream job as I could hope for.1 -
One month ago. By email.
Boss: so, this client A has a problem with one of our devices and he believes that it's a bug in the software.
Me: all right then, what happens?
Boss: well, he says that the parameter P in the option menu does not changes the device's behaviour as it is supposed to. I'll forward you his mail. You will find attached an excell file with the results of his test performed with and without the parameter active.
Me: < read mail, read excell file > well, boss, his tests are performed in completely different conditions, how could he expect to infer a meaningful results from this?
Boss: damn, you are right. Send him a test plan and follow up.
Me: < send detailed test plan >
No answer in a week. Then...
Client: hi, there, I made this tests, I attached the excell with the results, can you check the software now?
Me: < read another bullshit filled excell file with none of the suggested test performed >
You know what? Just download the procedures you are using from the device and send them by mail, specifying the software version you are using so we can perform some tests here in the lab and get yo a solution asap.
No response. For a MONTH.
Super Boss: client A still has his problem, how could possibly be that it takes more than A FUCKING MONTH to solve his issue??
Me:...4 -
One component is used over 30,000 times. How many unit tests do you think we have for it? Zero. Fucking zero, Zip, Zilch, Nada, None.
WHAT THE QA FUCK!?6 -
Product Owner: "need this doing in 6 months, can you do?"
Me: "we're too busy to start another project at the moment - can you wait about 6 months for it to start, or I'll have to hire more devs"
PO: "I'll just outsource it"
36 months later the company he outsourced to is out of business and hasn't delivered, and I've had their half-finished shit show git repo dumped on me.
No comments, no docs, and no units tests, so no fucking idea what it's supposed to do4 -
"We need to reduce the scope of the project, guys... What if we don't make tests? They're taking some time do write, so..."
Yep. Let's compromise the quality and call it scope reduction. It will make wonders to our roadmap 👍6 -
Client: "I did not receive the email that should be send after that event. Please fix."
Me:
* Checks code - ok
* Tests feature in locally - ok
* Tests feature in production - ok
* checks values in database - ok
* 2 hours wasted - ok
"Please help me dear CTO, idk what else I could check or how I should even respond to this."
CTO: "hmm, the clients account uses a adminstrative email address for testing. Let me just check if it is in the mailbox."
*checks* "Yeah, that's the email you're looking for, right?"
Me: *experiences relief, anger, blood lust and disappointment at the same time* "Could you please respond to the client for me, I need a break. Thanks"3 -
For a week+ I've been listening to a senior dev ("Bob") continually make fun of another not-quite-a-senior dev ("Tom") over a performance bug in his code. "If he did it right the first time...", "Tom refuses to write tests...that's his problem", "I would have wrote the code correctly ..." all kinds of passive-aggressive put downs. Bob then brags how without him helping Tom, the application would have been a failure (really building himself up).
Bob is out of town and Tom asked me a question about logging performance data in his code. I look and see Bob has done nothing..nothing at all to help Tom. Tom wrote his own JSON and XML parser (data is coming from two different sources) and all kinds of IO stream plumbing code.
I use Visual Studio's feature create classes from JSON/XML, used the XML Serialzier and Newtonsoft.Json to handling the conversion plumbing.
With several hundred of lines gone (down to one line each for the XML/JSON-> object), I wrote unit tests around the business transaction, integration test for the service and database access. Maybe couple of hours worth of work.
I'm 100% sure Bob knew Tom was going in a bad direction (maybe even pushing him that direction), just to swoop in and "save the day" in front of Tom's manager at some future point in time.
This morning's standup ..
Boss: "You're helping Tom since Bob is on vacation? What are you helping with?"
Me: "I refactored the JSON and XML data access, wrote initial unit and integration tests. Tom will have to verify, but I believe any performance problem will now be isolated to the database integration. The problem Bob was talking about on Monday is gone. I thought spending time helping Tom was better than making fun of him."
<couple seconds of silence>
Boss:"Yea...want to let you know, I really, really appreciate that."
Bob, put people first, everyone wins.11 -
My code broke for no reason.
I added a log statement to see why.
*tests code*
It worked....
What the 何?!5 -
Why... why the fuck do people write unit tests and then comment out the god damn fucking assertion lines....
Like what the flying fuck? Cool, we can get some code coverage marks but for fuck sake actually let your tests do their fucking job!!!
Oh, the asserts fail?
Well fucking sort that shit out instead of commenting them out.
I don't get it, if you're going to write tests, fucking test something with them, or we'd be better of without them.7 -
User: “I’ve tried hundreds of different names. How come all the usernames are registered?!😤”
Developer: ”I’m quite confident about my code. Can’t find any issue in this login form.🤔”
QA: “It passed all unit tests. We did a comprehensive testing on live server by registering all the possible names. What can go wrong?🙀”1 -
I jump on an existing scala project.
git pull && sbt compile test
Tests are failing.
Me: "Hey team, the tests are failing."
Team member: "That cannot be. They were passing for the the last run."
Me: "Did you run them locally?"
Team member: "No, on Jenkins. It was fine."
I check Jenkins.
Me: "What do you mean it's fine. The last successful deployment was on the end of May."
Team member: "The Pull Request checker always went through successfully."
I check how our Jenkins tasks are configured. It's true that the Pull Request Checker runs successfully yet due to a "minor misconfiguration" (aka "major fuckup") the Pull Request Checker only tests a tiny subset of the entire test suite.
Team members were were fine if their Pull Request got the "Success" notification on bitbucket's pull request page. And reviewers trusted that icon as well.
They never checked the master run of the Jenkins task. Where the tests were also failing for over a month.
I'm also highely confused how they did TDD. You know, writing a test first, making it green. (I hope they were just one specific test at a time assuming the others were green. The cynic in me assumes they outsourced running the tests to the Jenkins.)
Gnarf!
Team member having run the tests locally finally realizes: "The tests are broken. Gonna fix them."
Wow. Please, dear fellow developers: It does not kill you to run the entire test suite locally. Just do it. Treat the external test runners as a safety net. Yet always run the test suite locally first.4 -
Me: *opens up a test script*
> only http response code is checked
Me: hey, coleague from qa, why didn't you also write response body checks?
Col: I had then implemented but removed them later.
Me: ?? Why??
Col: because tests were failing
Crickets: *chirp chirp* .... *awkward pause* [in high pitched crickety voice] what the fuck?!?!3 -
Some former colleague just blatantly commented out units tests I wrote for his build to pass. What the...7
-
## 4 years ago:
- Principal Architect: We are using IO1 storage type. What if we used GP2?
- Perf team: IDK, let's test it!
*we run tests*
- Perf team: results are OK, but we're exhausting Burst IO capacity, effectively hard-limiting number of tests we can run per day
- PArch: ahhh, I see. Then Gp2 is a no-go.
## 3 years ago
*PArch quits. New one is hired*
- PArch2: We are using IO1 storage type. What if we used GP2?
- Perf team: We've already tested that a while ago, results were THIS and THAT
- PArch2: I see. Let's test it again anyway
- Perf team: *wtf???*
*we run the same tests, we get the same results*
- PArch2: I see, so GP2 is a no-go.
- Perf team: *you think....? How did that thought never cross our minds, we wonder...*
## 2 years ago
*new DBA is hired*
- DBA2: We are using IO1 storage type. What if we used GP2?
- Perf team: We've already tested that a while ago, results were THIS and THAT
- PArch2: We've already tested that a while ago, results were THIS and THAT
- DBA2: I see. Let's test it anyways. I've read somewhere that GP2 might be a better bet
- PArch2: you might be right, let's do that
- Perf team: *wtf???*
*we run the same tests, we get the same results*
- DBA2: I see, so GP2 is a no-go.
- Perf team: *you think....? How did that thought never cross our minds, we wonder...*
## 1 year ago
*DBA manager left; new one was hired*
- MGMT_dba2: We are using IO1 storage type. What if we used GP2?
- ........
Should we even bother bringing up the history.....?11 -
Was in a meeting today with a team I just joined, I asked what they used to write tests.. they said they don't write tests because no one would see them..
This is crazy right?9 -
You guys should really take a look at your YouTube history sometimes (If you use it). It's amazing how I move from one video to another.
Here is what I did yesterday:
- I watched a GOT Season 7 review
- Then for some reason, I watched Underground nuclear test
- Several HD footages of Nuclear tests
- Top 10 Demolitions gone wrong 😕
- "No Planes" in 9/11 attack 😕
- Amber Heard's Sexy Prank 😕
Fucking hell, I need to get back to work ☹️17 -
The lead dev left the company two weeks ago. His last hurrah involved committing a bunch of complicated code into our API. The code he writes is generally overly coupled but this particular code is INSANE.
It is so coupled that the tests for it almost mock the entire application end to end. I only found this heap of garbage when the deployment tests were hung after I made a simple change in a totally unrelated file. THEY DIDNT FAIL. JEST GOT INTO A STATE WHERE IT CANT CONCLUDE AND HAS NO ERROR MESSAGES. We are taking about entirely different parts of the code. As far apart in the code as it can get. It took six hours of playing Sherlock Holmes to figure out what was breaking.
He got the most junior developer to approve the garbage PR as well.26 -
"I'm almost done, I'll just need to add tests!"
Booom! You did it, that was a nuke going off in my head.
No, you shouldn't just need to add tests. The tests should have been written from the get go! You most likely won't cover all the cases. You won't know if adding the tests will break your feature, as you had none, as you refactor your untested mess in order to make your code testable.
When reading your mess of a test case and the painful mocking process you went through, I silently cry out into the void: "Why oh why!? All of this suffering could have been avoided!"
Since most of the time, your mocking pain boils down to not understanding what your "unit" in your "unit test" should be.
So let it be said:
- If you want to build a parser for an XML file, then just write a function / class whose *only* purpose is: parse the XML file, return a value object. That's it. Nothing more, nothing less.
- If you want to build a parser for an XML file, it MUST NOT: download a zip, extract that zip, merge all those files to one big file, parse that big file, talk to some other random APIs as a side-effect, and then return a value object.
Because then you suddenly have to mock away a http service and deal with zip files in your test cases.
The http util of your programming language will most likely work. Your unzip library will most likely work. So just assume it working. There are valid use cases where you want to make sure you acutally send a request and get a response, yet I am talking unit test here only.
In the scope of a class, keep the public methods to a reasonable minimum. As for each public method you shall at least create one test case. If you ever have the feeling "I want to test that private method" replace that statement in your head with: "I should extract that functionality to a new class where that method public. I then can create a unit test case a for that." That new service then becomes a dependency in your current service. Problem solved.
Also, mocking away dependencies should a simple process. If your mocking process fills half the screen, your test setup is overly complicated and your class is doing too much.
That's why I currently dig functional programming so much. When you build pure functions without side effects, unit tests are easy to write. Yet you can apply pure functions to OOP as well (to a degree). Embrace immutability.
Sidenote:
It's really not helpful that a lot of developers don't understand the difference between unit, functional acceptance, integration testing. Then they wonder why they can't test something easily, write overly complex test cases, until someone points out to them: No, in the scope of unit tests, we don't need to test our persistance layer. We just assume that it works. We should only test our businsess logic. You know: "Assuming that I get that response from the database, I expect that to happen." You don't need a test db, make a real query against that, in order to test that. (That still is a valid thing to do. Yet not in the scope of unit tests.)rant developer unit test test testing fp oop writing tests get your shit together unit testing unit tests8 -
Had a 1:1 with my boss last night and together we figured out a tricky bug related to my PR. However, either my PR or that bug patch broke a tangentially-related test. Queue my usual exhaustion, and I gave up trying to fix it.
This morning, I'm looking at it and nothing makes sense. My change should not have broken the test. So I reran the controller's tests, and... they all pass?
What is logic.
Good thing, though; that test leads to a few rabbit holes I haven't even begun exploring yet.
Oh, never mind. It broke again.
Ergh, here we go. 😔11 -
We've had a bunch of flaky tests in our repo for a while now that no one could be bothered to fix; we'd just re-run ci until it's green. Today I looked into it and I was inspired to make this meme, because I lived through it.
Adding logs to investigate just lowered the fail rate making investigation more difficult. I do have an idea of what it might be though so, we'll see tomorrow.3 -
I think I'm falling in love. With TDD.
I used to be very skeptic about it. You know, the usual reasons: it takes longer to deliver, constant "flow" interruptions, etc, etc. But ever since I've tried it I'm nothing but happy about my choice :)
I'm moving forward, I'm not making any regressions, I'm no longer afraid to make any changes in my code as I know tests will show what exactly I break,.. And most importanty, I have all use-cases with corner-cases defined and "explained" in the code... No more do I have to search in Confluence for how this exact scenario should behave. Everything is here. Everything's in the tests.
It's amazing!
Yeah, it DOES take longer to deliver so if you're hardcore Agile living by "Ship it as soon as it compiles" TDD might be too slow. But if you prefer knowing when your code is covering all the use cases w/o any errors -- TDD is the way.12 -
Boss: Any idea why ColleagueX's code might be blowing out the memory?
Me (internal): Cos he's a fucking retard who can't code for shit, doesn't listen when I tell him to do stuff properly because he's fucking lazy, has no idea what stack and heap are, uses goto everywhere, doesn't know how to debug, doesn't write any unit tests, and generally WASTES MY FUCKING TIME!
Me (external): Probably a memory leak. I'll take a look.2 -
There are 2 node js apps floating around the city...built by me for intranet apps used in a logistics company.
I legit asked a friend if it has been replaced and he said no, that they keep on running like a fucking beast causing no issues whatsoever.
Fascinating. I was legit expecting it to crash a while ago.
Guess mern stacks do scale if you know what you is doing.
Write your unit tests people.2 -
Skipping unit tests and documentation ...
I'm starting to recover after not writing a single test for the first 6 years of my professional carrer (wasn't taught in school, didn't know where to start, man I should have really found a mentor earlier), and barely any documentation (I was the sole developer for several years, and just didn't get into the habbit).
Unit testing is still not a habit, but now I have the first tests to serve as an example and an idea what/how to test at least, and I try to get every new "framework" function/class at least commented properly.
Wish me luck2 -
Unit tests fail.
Re-ran it again without looking at details.
Unit tests pass now.
What. Why?!
Now I can't sleep at night.6 -
boss: we should map all the possible ways to do things in the system so we can test them and make sure we fix the bugs.
Me: yeah, well, that is exactly what automated tests are for, every time we find a non-mapped way that breaks this we make a test out of it and fix, this ways we end up mapping the majority of ways.
Boss: yeah,yeah ... Let's sit down latter and map everything on a document.
I bet my ass we are never gonna have tests as a part of our workflow.3 -
A while back I feel asleep on the couch on the day of the state of the union address.
My deadass mind heard someone asking what the "state of the unit tests" was and I leaped up and said "there aren't any! i'm sorry, it's only a small project anyway".
Thank god no one else was there... 😂 -
team lead: what is the minimum lenght validation on the first name field?
dev: i decided to put minlenhgt 3
team lead: why? did you tests it
Dev: i tested it. 3 makes sense to me
Team lead: isint your first name 2 letters long?
Dev: oh i dodth think about that4 -
Tests!
Before you write a piece of code, write tests which will check that the code does what you expect. This helps you in two ways:
1. It forces you to think about and understand the purpose and aim of the code you're about to write before you start hacking away at it.
2. You know when you're finished, because the tests will pass.1 -
I REALLY HATE TECHNICAL PHONE INTERVIEWS!!!
I was asked: "What are the differences between C++ and Java?"
I got a mind blank at that point... Good thing it didn't last long and I came back with a reply.
But seriously, if you can't speak English clearly, why? Why? WHY?!
(I lost a whole question because I couldn't understand the interviewer. ☹)
At least it went "well" and now I have to improve the "technical" document and do 2 tests by Monday!11 -
Some random coworker has been asked to setup tests for the framework written in Java and the GUI is a web app that comes with the framework.
Since he doesn't know any language we work in, he decided he would do it in Python. When I asked him why introduce Python and he replied with "it doesnt matter which language it is because it is going to run on selenium"
I told him to either use Java or Javascript for selenium because when he leaves we should be able to maintain the tests and not first figure out what the hell you wrote in Python
He didnt understand and is going to go with Python anyway8 -
Boss: "i need you to build a feature so that customers can do bla bla bla and it has to be done by friday.
Dev: "Ok i can do it fast if you sure this is what you want, and requirements wont change in the future. Have you considered bla bla"
Boss: "Yes do it"
Dev: *writes, tests and deploys code*
A few weeks later:
Boss: "we need to add bla bla to the feature you built since some requirements has changed."10 -
I fucking hate the fact that this group I'm side-hustling for gives maintainer access to every shitty dev they have.
Dev pushes four commits directly to master branch. Each time, pipeline fails on unit tests.
Shithead ignores failed tests and manually deploys to stage anyway.
Fuckface then declares (in group chat) that her "fix" works on stage and proceeds to merge to RC branch without updating the fucking unit test.
Pipeline fails (of course) and remains unfixed for the last EIGHT FUCKING HOURS.
This is what I woke up to at 6-fucking-AM in the god-damn morning.
*insert multiple expletives and insinuation of mother's excessive girth by comparing waistline to equator1 -
Creative dev compliments? Wow, that shows what type of person I am. I only know creative dev insults. Okay let me give it a go!
Wow, I'm gonna star that on GitHub!
Good work! I'm gonna put a shortcut to that right here on my desktop (in the same tone as "I'm gonna hang that on the fridge")
You're so meticulous that the unit tests are to make sure the computer works correctly, not your code.
If you were a web server, you'd always return 200/OK.
Your parents must have compiled you with -Ofast -
A discussion about writing tests for frontend applications.
Context: my frontend coworkers don't write tests, at all. Yeah, really. Our testing process is very manual. We test manually when developing. We test manually when reviewing code. After merging, the application is deployed to a staging server and the design team does a QA Sprint. Lots of manual testing and some bugs still crawl by.
So I decided to start pushing my coworkers to start writing tests. One of the reasons I constantly hear them say to not write tests in the frontend is: "It's not worth the time, because design keeps changing, which means we have to take time to fix the tests. Time that we usually don't have."
I've been thinking about this a lot and it seems to me that this is more related to bad tests than to tests in general.
Tests should not break with design changes (small changes at least). They should test funcionality, not how things look. A form should not break if the submit button's style changes, so why should its tests fail? I also think that tests help save time, as they prevent some back and forth because of bugs.
Writing good tests is the hard part. Tests that cover what's really important and aren't frail and break with things that shouldn't break them. What (and how) should we test? And what shouldn't be tested?
Writing them fast is another hard thing. Are you doing it right if they take more time to write than the actual code?
What do you think about this? Do you write tests for your frontend applications? What do you test? How much time do you spend writing tests? What are your testing tools/frameworks?6 -
Have you ever had a problem with a partner, but you cannot prove at 100% that he has something against you? But you cannot stand him?
Well, this happened two years ago. I was working as a tester, and “John” (I won’t say his real name) was the dude who tests my tests, but in production.
I ‘m a sociable person, and I don’t mind talking with another people. Suddenly, I noticed that my co-worker started to behave a little bit... rude? Plain? I don’t know, but sometimes he didn’t answer my conversations/questions, or sometimes answered with extra-negative stuff.
“Well, his life is not easy” I said to myself. “Everybody haveproblems”, “I have to understand him and calm down”.
Two weeks later started to report really REALLY absurd production bugs, and with absurd I mean, for example, that he didn’t like the color of a button, a point next to a phrase, etc., things very very simples, but sometimes he ignored big errors.
Once I had to went out of the city for few hours, and asked to permission to go out. I had pending tests, but I left a document with specifications in case of emergency. Even passwords. Before I could finish the thing in the other city, my partner called me two times, and asking me obvious things! I had to go back to the office ealier that I had planned, so f*** angry 😡 and when I arrived to the office, John said “no, forget it, let’s solve it tomorrow” 🙃 WTF?!!!!!!
I decided not to argue with him.
Also noticed that his headaches suddenly increased, and looked so tired ☹️ I felt guilty to judge him
I felt so guilty, and even today I don’t know what to feel about that or what to think. I don’t work there anymore, but, What do you think? What would you do?6 -
Just joined a new team at the organisation as senior dev.
Team lead keeps singing about how we need unit testing and good standards.
I implement domain pattern on the backend supported by unit tests.
It passes QA and then get an earful about the code not being 'restful'. What does that even mean?
Well, it matters not since team lead changes the whole feature in the release branch and all unit tests obviously fails. Builds start to fail.
The solution? Comment out all unit tests. In the sprint retro, we hear the same old adage 'we need 80% code coverage'
Do as i say, not as I do. FML.6 -
Once during a standup, I mentioned that I needed to fix some unit tests before the build would be ready. Our tester then said "no time for tests, we need the build now". That was a dark day.
-
How to NOT write unit tests:
A colleague of mine has developed a new package of software, many of our new projects are going to use. So in his presentation of the new functionalities he also showed us that he used unit tests to cover some of his code. So i asked him to show me that all tests passes.
He: I can show you, but one test suit will fail currently.
Me: Why?? You told us, everything is finished and works fine.
He: That's right, but they will fail because I'm currently not in the customer VPN.
Me: Excuse me, WHAT??
He: Yes, I'm not in the VPN that connects me to this one customers facility in Hungary, where the counterpart of the software is runnung live.
Me: YOU WROTE UNIT TESTS THAT TEST AGAINST A RUNNING LIVE FACILITY??
He: Yes, so I can check, that the telegramms I send are right. If I get back the right acknowledgement, the telegramm structure is right and my code is working.
Me: You know, that is not the porpose of unit tests? You know, that these test should run in any environment?
He: But they are proving, that my code is working. Everytime I change something I connect to the customer and let the tests run.
Me: ...
Despite the help of some other developers we could not convince him that this was not good and he should remove them. So now this package is used in 2 new projects and this test suit is still failing, everytime you execute all unit tests.7 -
My only nemesis are sales people.
* They try to sell the impossible to the customer.
* They think even the biggest change takes only some minutes to implement, and tests do not even exist.
* They promise to deliver an app within half the time which means we have to cut out animations or some tests to deliver when due.
* They often get a commission (sometimes not as part of profit but revenue!) for calling their pals and asking them if they wanna buy something new (some say they also take the risk, but they don't, the company does).
There may be exceptions, but my perceived ratio between good and bad sales is about 1/20.
Now I am in a very small company with only one sales guy. Guess what, he is a good one! I hope he stays forever.6 -
Me and my team has been creating React components for the last two months. Today we realized that not a single component is done the Redux way (as pure functions), which means we have to refactor every component and the tests.
That's what you get for trying out new technology..3 -
Tired of reading spaghetti code written by your team mates?
Sit right next to them and ask them to write unit tests for that code.
Smash their head on the keyboard everytime they have to think longer than 10 seconds on how to test a specific logic.
Strangle them with any wire you find nearby till they agree to break up that spaghetti code unless they already started within that 10 second time frame.
When the exercise ends, tell them this is what refactoring is and ask them to pass on the knowledge.5 -
God: you qualify for reincarnation. What advice from past life do you want me to retain in your memory ?
Me: never forget to write those unit tests!2 -
After working 3 years in my current job and my boss hating anything to do with unit testing etc, I used my spare time to refactor our Makefiles to allow for the creation of unit and integration tests. I technically didn't tell my boss about it, so my heart was in my throat when he Skyped me with 'what did you change in ...'?
After having bashed any workflow with testing in it, I showed him the new workflow and automatic testing in Jenkins and he was actually enthousiastic, just like all other employees! I was hailed a hero in the R&D department, after all this time we can finally write universal tests. :D7 -
This begs for a rant... [too bad I can't post actual screenshots :/ ]
Me: He k8s team! We're having trouble with our k8s cluster. After scaling up and running h/c and Sanity tests environment was confirmed as Healthy and Stable. But once we'd started our load tests k8s cluster went out for a walk: most of the replicas got stoped and restarted and I cannot find in events' log WHY that happened. Could you please have a look?
k8s team [india]: Hello, thank you for reaching out to k8s support. We will check and let you know.
Me: Oh, you're welcome! I'll be just sitting here quietly and eagerly waiting for your reply. TIA! :slightly_smiling_face:
<5 minutes later>
k8s team India: Hi. Could you give me a list of replicas that were failing?
Me: I gave you a Grafana link with a timeframe filter. Look there -- almost all apps show instability at k8s layer. For instance APP_1 and APP_2 were OK. But APP_3, APP_4 and APP_5 were crashing all over the place
k8s team India: ok I will check.
<My shift has ended. k8s team works in different timezone. I've opened up Slack this morning>
k8s team India: HI. APP_1 and APP_2 are fine. I don't even see any errors from logs, no restarts. All response codes are 200.
Me: 🤦♂️ .... Man, isn't that what I've said? ... 🤦♂️5 -
Nightmare IRL:
Your colleague is in PTO for 2 weeks.
You are in charge of maintaining his project along with yours, CI, code, tests and everything.
Your colleague's code base is a real master piece of shit when you look at it closer. By shit, I mean hardcoded values everywhere, random sleeps now and then, 20 if branches that could be replaced by maps, variables named a b c d everywhere, try catch to silence errors that should not be silenced, etc.
Your colleague left the CI and code broken as shit. Takes forever to run on my goddamn computer.
PMs are spamming you: "What is going on? It's red everywhere. Help! Plz fix this! We are going to release tomorrow!"
FML6 -
A few years ago I was in high school and used to have a small reputation of hacking things. I could hack, just would never hack any school networks or systems (reputation + notice that there was a breach is a bad combo since everyone would immediately suspect you).
Anyways one day the networks internet connection went down in the school district and I was the only one who used a laptop to take notes. So I quickly opened the terminal and ran Wireshark and said to the person to my right "see that button there? yeah I programmed this last night. anytime I press it I can shut down the network so the teacher can't reach her files (she famously only saved them online). *Long dramatic press* Wireshark started scanning the network so all the numbers and lines were going crazy as it viewed the packet info "Now just wait", soon the whole class knew what I had done through whispers and lo and behold a few minutes later and the teacher couldn't reach her files.
Everyone loved me for the rest of the year for saving them from the homework for the week the wifi network was out since it also ended up having to cancel two tests in the class, and a lot more homework and tests in all their other classes. Solidified my reputation and no one fucked with me from that day on. -
This whole corporate numbers game is killing me. I know I'm getting paid to do what I'm asked, I know. But the metrics are so one dimensional
You fixed the data of 20 tests? Doesn't count because you didn't code
You implemented a function to reduce recurrent failures in the future? Doesn't count because those already pass with time consuming workarounds
You spent half a day communicating and coordinating across teams to fix an issue? That's 1 test, this other person changed 1 line in 5 files, you're 4 tests behind4 -
I have a lab at uni where my lab group have to refactor some code from an open source project. We got assigned some Apache project and jfc that code is a mess. Little to no documentation, hard to navigate, tests that you have no idea what it's testing, and so on. On top of that the teacher expects us to spend more time than we have on it. I'll be glad when this course is over :))5
-
TDD.
I'm a fan of writing tests right after you write every module. I actually think it's doable.
But I'm not a big fan of traditional TDD, which is defined as: first writing the tests, making them fail, writing code until tests don't fail.
My experience with traditional TDD when writing library code is that you start with this very naive idea of what is needed, so you write classes and functions and a lot of times they look like overly simplistic pseudocode.
So what do you do? You scratch that, you delete those classes/functions several times.
I think this discovery process that your code is naive is slowed the fuck down by doing TDD.
I'd rather write a theoretical API in a readme file, then write code, and then write the tests, you can even withhold writing the tests, but never leaving them for another day, just so that you don't waste time writing tests that you're going to scratch.
There's always a time constraint, and most of us can't afford bikeshedding.
Traditional TDD feels like an esoteric thing, it tries to make programming a series of steps, it actually sounds like an infommercial.
"FOLLOW THESE 3 SIMPLE STEPS AND WRITE THE BEST CODE EVER"11 -
Realized there was a bug in my npm package that made it hard to update the state of the input field conditionally (rather than explicitly through user action) and fixed it, wrote tests to ensure it was working the way I thought it was, updated the dist, updated the package version, merged, cut a GitHub release...
Then uninstalled and reinstalled it in the project I’m using it in and it didn’t work. What the eff, I think. Take a couple hours furiously trying to figure out why the hell the behavior doesn’t seem to match the behavior of the new version.
Then it dawns on me. I check the package.json.
“react-autosuggestions”: “^2.1.0”
.... I forgot to do the “npm publish” step.
*head desk* -
This is getting annoying.
For the past >half a year I've been chasing windmills. This is what my BAU day looks like:
- We login to client's network
- We start running some Sanity tests before the actual runs (actual runs are hell of an expensive (financially and time-wise) thing to launch) to make sure environment is OK.
- Sanity tests fail. wtf? Nothing's been changed since y-day!
- Spend ~3-4 hours digging logs, code, more logs,... Apparently some genius decided to change a single parameter.
- Spend another 1-2 hours trying to work around that parameter (since apparently that genius did have a task to do that, so we'll most likely have to find a way to live with it)
- Restart the whole env (~30min).
- Launch a Smoke, Sanity tests to verify env state.
- Launch the actual test
- Go home.
Next day:
- We login to client's network
- We start running some Sanity tests before the actual runs to make sure environment is OK.
- Sanity tests pass.
- Run the actual test
- Concurrency on RDS database is sky-rocketing! WTF did that come from??? Nothing's been changed since y-day!!
- Spend ~1-2 hours looking for anything changed, dig some logs for anything unusual. Nothing.
- Escalate to DBA. 2 hours later DBA says "fix the app". thanks for nothing mate....
- Spend remaining 2 hours analysing AWR. Give up, restart the whole RDS instance. Another hour wasted.
- Time to go home. Out of curiosity run Sanity test -- all good. Run the actual test -- all good. wtf??
- Go home
Next day
- We login to client's network
- We start running some Sanity tests before the actual runs to make sure environment is OK.
- Sanity tests fail. wtf? Nothing's been changed since y-day!
- Spend ~3-4 hours digging logs, code, more logs,... Apparently some genius decided to change a single parameter.
- Spend another 1-2 hours trying to work around that parameter
- ..... I think you know where this is going.
And this keeps going on and on, day by day. Spending the better half of the day chasing windmills and doing our actual work on the last hour of the working day or even after that.
We have plenty of interesting tasks in our Jira but we're squirels spinning in the wheel and never being able to touch them.
It feels like I'm wasting my time. I could do so much more with my time!
[just needed to vent ] -
So, learning Java at the moment.
Thoughts so far:
“This IDE is going to make me so lazy! It can write getters, setters, AND toString() for me?!”
“Oh my god, angle brackets. It’s like someone with a love of nesting was made fun of for wasting space and retaliated by crafting a language that inlined nesting data types.”
“Whoa, this would safeguard what kind of input went into the function SO MUCH.”
“DOES THIS MAKE IT EASIER TO WRITE UNIT TESTS?! *excited*14 -
End user when criticizing a developer for 'taking long' to create something of value from scratch:
(4 hours later): "What's taking you so damn long? Are you retarded?"
Oh I don't know, maybe I have to make sure that tests in my code run well, maybe I have to evaluate everything to meet the custom satisfactions of the user for his ever-so-custom requirements and I also have to make sure I discard what they don't like? And maybe it takes time to deliver a quality product, and so on?
Or would you prefer I deliver an untested product that I didn't bother to think about and I haven't bothered to make sure it matches with their requirements?
What end users don't understand is the involvement in a quality product.2 -
Went to college feeling like I didn't know enough to keep up with the game development course, ended up knowing so much that I tested out of my entire first year and ended up teaching my professors what to do. I got special permission to ditch classes and on several occasions taught the class stoned off my ass. I didn't need to submit homework or take tests. I had my own game studio founded so I was allowed to show off my work as my final project. College was a great time for me lol
-
Nobody Unit Tests.
So it's already 1:15am late night and I am all tucked up in bed watching Roy Oshrove talk on unit testing and ways to write correct unit test. My friend walk in and finds me in bed watching this. He seems surprised as what are you doing ??
I replied it is an interesting talk on unit testing.
He says are you mad? Who the hell does unit testing ?
People out there are spitting on unit test code base. And they don't write unit tests.
Nobody unit tests.!!
I stay calm. I know there is no point of arguing. I said I'll sleep in some time.
And he works as developer, a job that I applied an never got because of connections.
I am optimistic someday I'll find a job that I deserve. The developer world is in danger. !!!4 -
Why is source code so crappy? May career is not the longest, buy in my 8 years I talked to so many developers and every one told me how important quality, standards, tests and architecture are - but every codebase I've seen is lacking all of it. Everything is running on constant live support.
I don't get it. It is like I live in a world where everyone does know what has to be done, but no-one does it. I suspect it is because people are lazy, lying and won't say no but that's also not a world I want to live in.24 -
Boss: "we're going to take over a project from another company. that's what we know so far - any other questions?"
Me: "do we get the history (svn/git) or just current source? unit tests?"
Other company: "no history for you. no unit tests - app was only tested manually"
Me: *sigh* :'(3 -
Oh, RSpec.
Adding recaptcha tests, I copy a passing login spec
and because I'm bored, I run it again just to check.
I paste in the passing mock
and run it in my new block
and oh no, why are you failing? What the heck!?1 -
I opened an issue on a repo telling the owner that placing a "test passing" badge on the readme but not having other tests than an "ExampleTest" and no tests of the actual functionality is bad practice and what he thinks about updating the readme.
The result was a deletion (not close) of the issue and a ban from contributing (issues, PRs) on any of his projects.
And it was not some small "ten persons use this" project but a large boilerplate project with 2.4k github stars and over 800 forks. You would expect a little bit more professionalism of someone with that popularity.4 -
Today I told 3 devs that they either get their shit together or they can pack their things and look for a job.
I can get easily pissed, but it's rather rare for me to get to that point easily.
Now my dear friends, can you guess what they did?
I give you a hint...
They made a test suite validating a network library.
So we have roughly 200 plus lovely splitted tests, neatly put in a directory structure - lovely organization.
(I might have written in the ticket that as a requirement... Cause I know my lil hellspawns)
But as I started looking at some tests, there was always something missing...
Network library...
So we needed to create an endpoint... And handle of course the tests communication with the endpoint *somewhere*.
I'd guess you know already what these mofos did...
Yeah. We have one class.... That handles all tests endpoints... Via different methods... Plus additional methods like utility functions....
The ticket was easy they said.
Me chewing their heads off was easy too.
Jesus Christ, I really doubt sometimes that some devs are able to go to a toilet.
Maybe thats the reason some wear baggy pants - easier to hide the pampers.
*rolls eyes*3 -
After working on 7 projects last year with 7 different groups and learning to "flow like water", I don't feel the urge to rant anymore. There are always going to be all kinds of weird scenes, cheap clients, incompetent coworkers, people that pretend to know something when they actually know shit. All of those are just tests life is presenting you to make you learn to be peaceful and tolerant.
The world is broken, accept it, and allow yourself to be an ordinary human being, you'll be free and happier. Stuff like the law of attraction does exist. Just learn to be happy and grateful for what you get and you'll get a ton more reasons to be happy and grateful9 -
Was talking about how I implemented CI/CD in one of our projects as a starting point to others and how it worked by running tests and deploying to the server and one of my colleagues laughed about having to have tests at all, I explained and asked him what was he gonna do that morning, his answer:
"Well, I'm gonna test the system X and fix some bugs"
To what I replied:
"If you have automated tests you could have those tests automatic(?!) and they also help you finding bugs early"
Wtf do ppl have in mind that they prefer remediation over prevention and they end up wasting their time with shit that could be fully automated?2 -
Our project at work goes live in 3 weeks.
The code base has no automated tests, breaks very often, has never had any level of manual testing
will not be releasing with any form of enforced roles or permissions in our first release now due to no time to enforce, however there is a whole admin api where you can literally change anything in our database including roles.
We also have teams in various countries all working separately on the same solution using microservices with shared nuget packages and they aren't using them properly.
Our pull requests are so big - as much as, 75 file changes - in our fe app that I can't keep up with it and I honestly have no idea if it even works or not due to no automated tests and no time to manually test.
We have no testing team, or qa team of any sort.
Every request into the system has to hit a minimum of 3 different databases via 3 different microservices so 1 request = 4 requests with the load on the servers.
We don't use any file streams so everything is just shoved in the buffer on the server.
Most of the people working on the angular apps cba to learn angular, no one across 2 teams cba to learn git. We use git so they constantly face problems. The guy in charge has 0 experience in angular but makes me do things how he wants architecturally so half the patterns make no sense.
No one looks at the pull requests, they just click approve so they may as well push directly to master.
Unfinished work gets put in for pull request so we don't know if the app is in a release state since aall teams are working independently, but on the same code base.
I sat down and tested the app myself for an hour and found 25 fe only issues, and 5 breaking cross browser issues.
Most of our databases are not normalised. Most of our databases make no sense. 99% of our tables have no indexing since there is no expertise with free time to do it.
No one there understands css properly. Or javascript.
Our. Net core microservices all directly use ef in the controller actions so there is no shared code there.
Our customer facing fe app is not dry because no tests so it was decided it was better this way.
Management has no idea on code state, it seems team lead is lieing to them about things like having any level of tests.
Management hire devs that claim to be experts but then it turns out they have basically no knowledge of what they were hired to do, even don't know what json is or the framework or language they are hired for, but we just leave them to get on with it and again make prs too big to review.
Honestly I have no hope that this will go well now but I am morbidly curious to watch. I've never seen anything like the train wreck that we are about to get experience.5 -
Product Owner keeps demanding developers do items outside of Sprint, deleted story points to get extra items in, signs off holiday for my staff, even hired some unqualified developers, etc. for my team (I'm the Dev Manager). I'm blessed to report into the PMO who backs up the Product Owner, in front my own reports, meaning I have no authority. What would you do?
PMO has decided that if we drag items from Sprint to Backlog when they reach SIT, we have more space for Dev items in the Sprint :-| Though he expects developers to actually do the SIT work, including writing the SIT tests :-|2 -
58 of 64 tests failed
Me: "what the actual fuck."
*spends 10 mins looking through logs wondering why these valid tests were marked as failed*
Me: "Oh shit I just configured the test case wrong"1 -
Me: Startup initialization tests fail so the system won't boot properly it until we fix those issues.
Manager: comment out the lines of code that are causing problems.
🤔 So we are just going to feed power to some hardware and see what happens I guess1 -
"Alright everyone, we can't keep this up. Every day our builds are breaking because of test failures."
"We could just be more diligent devs and actually write/update tests based on new behavior we introduce to the system?"
"What? No! We're just going to get rid of all tests!"
a few days later
"Guys!!! Everything's on fire now! How didn't we catch these huge breaking changes!"
https://media3.giphy.com/media/...2 -
So... About a month ago 2 interns started a project from scratch at my company. My boss gave them a project to follow as an example (more for the api and database side).
Wednesday they ended the internship and I've began to help fix the rest of the kinks that were left to be fixed. Friday we were finishing up the app and api to send to the client for tests. The database was created with 4 tables that were equal in structure... Imagine that you need a table for orders and they have status like pending, cancelled, finished and accepted. What they've done was they created 4 tables, one for each status....
Why the hell would you do this???5 -
Boss: Where should i put this piece of code so the android app will work correctly?
Me: Maybe here and we run some tests.
Boss: What? You built the app so you have to know where I should write the code for the endpoint and your app will work. No time for tests. And no update.
Fuck you boss.3 -
I'm finally writing unit tests consistently thanks to a simple file organization decision.
I'm not doing pure TDD, but at least I'm writing the tests immediately after writing a module, and I make sure they run ok.
What I'm doing is Instead of putting the test files in a "tests" dir at the root of the project, I have the tests right next to the source code.
So if I have a dog.x file, I also have a dog.test.x file next to it.
I'm not inventing gunpowder here. I've seen several people do this.
But it's something that is not generally made a default or advised to do.
Like I said; test frameworks in general go with the classic "tests" dir.
But for me this is day and night in whether I write the tests or not.
Which makes sense. Imagine the classic scenario of the "tests" dir, and you just created a file deep into a hierarchy, let's say src/lib/console/windows/dog.x
This means that if you want to write tests for that, you need to make sure the hierarchy tests/lib/console/windows/dog.test.x exists
If the test file already exists, but you want to access both files, you need to traverse deep for each.
Also, it's actually harder to keep track which files have unit tests and which do not.
Meanwhile, if the test files are next to the source, all these problems disappear.
That doesn't mean there are no other challenges with testing, like testing untestable things, like system calls or http requests, but there are ways to deal with that. -
Employer: Hey, we are moving an API update live tomorrow morning that could affect our apps. Can you regression test the apps to make sure they all work?
Me: The API team is pushing code overtop of live endpoints that can break them?
Employer: Yes, we need the updates to work with a new product we are developing.
Me: And nobody thought about versioning these endpoints so we guarantee uptime on all existing services using them now?
Employer: We looked at that but it cost extra and required us to use the cloud solution so we don’t use versioning.
Me: Okkk… I also take it that the API’s don’t have integration tests written?
Employer: What are integration tests? Are unit tests the same thing?
Me: No, so when do I need to regression test all 7 production apps?
Employer: The API’s are moving to production at 4am and we need it signed off by 7am.
Me: I only have 3 hours to regression test 7 production apps at 4am? Each app, if I just skim over them, would take me 2 hours each. I will do my best but that’s a very short time to ensure complete functionality.
Employer: Don’t you have unit tests?1 -
Fucking nice, my damn PC has problems handling RAM and can't stay more than 1 minute in any OS without crashing. Windows bluescreens with MEMORY_MANAGEMENT or other bullshit. Nice fucking situation. It's either my CPU's IMC or all of the four RAM sticks. Long tests say it's not my board. Either way, I'm fucked because I haven't got any money to replace my PC yet.
What a coincidence, I got similar parts to someone on Google+ who lives near me and has this exact problem EXCEPT HE CAN REPLACE HIS PC SOON AND I CAN'T. GREAT.10 -
Okay, this is MAJOR FUCKING BULLSHIT.
I understand variability of, dunno, 10, but 40?
The tests were ran on the same machine, one after another. What the fuck?9 -
What is it with networking guys refusing to do any kind of fault finding? Pretty much everywhere I've worked they seem to be overpaid address hogs who occasionally want everyone to be proud of them for installing a new switch.
Currently seeing a production issue that's clearly due to spikes in packet loss on a certain part of the network - but oh no, it's always "our tests are fine", "we can establish a route no problem", "this is an application level issue", etc.
No you morons, when a dozen unrelated applications hosted on different cloud services fail because none of them can contact anything in your particular subnet in your data center at the same time, it's a damn networking issue. Sort it out.14 -
My current job at the release & deploy mgmt team:
Basically this is the "theoretically sound flow":
* devs shit code and build stuff => if all tests in pipeline are green, it's eligible for promotion
* devs fill in desired version number build inside an excel sheet, we take this version number and deploy said version into a higher environment
* we deploy all the thingies and we just do ONE spec run for the entire environment
* we validate, and then go home
In the real world however:
* devs build shit and the tests are failed/unstable ===> disable test in the pipeline
* devs write down a version umber but since they disabled the tests they realize it's not working because they forgot thing XYZ, and want us to deploy another version of said application after code-freeze deadline
* deployments fail because said developers don't know jack shit about flyway database migrations, they always fail, we have to point them out where they'd go wrong, we even gave them the tooling to use to check such schema's, but they never use it
* a deploy fails, we send feedback, they request a NEW version, with the same bug still in it, because working with git is waaaaay too progressive
* We enable all the tests again (we basically regenerate all the pipeline jobs) And it turns out some devs have manually modified the pipelines, causing the build/deploy process to fail. We urged Mgmt to seal off the jenkins for devs since we're dealing with this fucking nonsense the whole time, but noooooo , devs are "smart persons that are supposed to have sense of responsibility"...yeah FUCK THAT
* Even after new versions received after deadline, the application still ain't green... What happens is basically doing it all over again the next day...
This is basically what happens when you:=
* have nos tandards and rules inr egards to conventions
* have very poor solution-ed work flow processes that have "grown organically"
* have management that is way too permissive in allowing breaking stuff and pleasing other "team leader" asscracks...
* have a very bad user/rights mgmt on LDAP side (which unfortunately we cannot do anything about it, because that is in the ownership of some dinosaur fossil that strangely enough is alive and walks around in here... If you ask/propose solutions that person goes into sulking mode. He (correctly) fears his only reason for existence (LDAP) will be gone if someone dares to touch it...
This is a government agency mind you!
More and more thinking daily that i really don't want to go to office and make a ton of money.
So the only motivation right now is..the money, which i find abhorrent.
And also more stuff, but now that i am writing this down makes me really really sad. I don't want to feel sad, so i stop being sad and feel awesome instead.1 -
Assignment release: this is a basic assignment that is supposed to help you understand the basics of memory allocation. You are free to use any design you want, however you can implement more advanced features that would lean towards specific designs. What will be punished is that you don't have a dynamic memory allocator. We will run the tests for these offline after the deadline
2 days before the deadline: we released the tests for checking whether you're allocating memory dynamically, but these tests also check for this specific design. So fuck you for choosing any other design than this one. Have fun on sleepless nights.
Fuck me, I guess, for worthlessly working on a different design than they wished for, but didn't specifically ask for from the beginning. I just wasted 2 weeks of my life and feel unmotivated af to do anything anymore regarding this. Fuck this shit. Fuck them. Fuck this course.1 -
My new favourite commit message:
"All changes as of 18th Sept"
How tremendously useful? There I was looking to know what changes were made to enable a feature / service, thought I could look for that in the commit message, but no you've given me a much more efficient way of finding out.
I simply need to download the contents of your memory, find out what date you made a change, and then dig through the massive commit to find the piece of info I need.
Forget experience using Git features, managing merges, following Git flow, or even any other SCM ... how can people be so tick when it comes to recording what they've done.
Heres a little cheat sheet for those struggling:
- Commit message
Describe what you actually ****ing did. Don't tell me the date or the time, thankfully Git records those. Don't tell me the day of the week, if I need to know I can figure that out, just tell me what ... you ... did.
- Feature branch names
Now this is a tricky one. You might be surprised to know that this isn't in fact suppose to be whatever random adjective or noun popped into your head ... I know, I too was shocked. The purpose of this is to let other people know what new feature is being worked on in this branch.
- Reusing feature branches
Now I know you started it to add some unit tests, and naming it "testing" is sort of ok. But its actually not ok to name it testing when you add 3 unit tests ... then rip out and replace 60% of the business logic. Perhaps it would have been wiser to create a new feature branch, given you are now working on a new feature.2 -
delete unused code according to IDE
unit with context tests now fail
what is a good alternative industry or career instead of software development8 -
My status update for tomorrow:
"I've done the tests and have the results, now all I have to do is work out what the numbers mean coz I started this task 6 months ago and have spent most of the last 6 months putting out fires elsewhere and have no idea what I was doing".2 -
aahh, that's a nice feeling!
Half a year ago I was borrowed to a client's team as a pair of helping hands on one project. Today I pulled that project source again to see what has changed.
The only things changed in my code are typos in strings (missing space, missing letter, etc.). Not a single error in actual code.
Maybe >90% TDD tests coverage has smth to do with it ;)
aahhh, that's a nice feeling :)3 -
My Precalculus teacher has such overstrict rules on showing work.
1. On tests, degree signs must be shown in all work. This wouldn't be outrageous except that if the answer is right but a single degree sign is missing in the mandated shown work, the entire question is wrong even with a correct final answer because the "answer doesn't match up with the work".
2. We must show work in the exact form mandated from on class. If even a single step of work is missing or wrong on even one say homework problem, no credit even if the entire rest of the sheet is correct and complete.
3. Never applied to me, but if a homework problem cannot be solved by a student, they must write a sentence describing how far they got and what wasn't doable, or no credit on the entire homework. Did I mention it is checked daily and is 2 unweighted points with 50-100 point tests?
4. On graphing calculator problems, one had to draw a rectangle representing the calculator screen, even for solving systems of equations without explicit drawing graphs as part of the problem, because otherwise, she had "no proof that a calculator was used". It isn't that hard to fake, and it was quite stupid.
5. Reference triangles were required even when completely unnecessary or the answers were assumed copied, even if a better method was shown in work.
And much, much more!4 -
We are not ready, I won't sign on this shit I said!
Release on Friday, what could go wrong? All unit tests passed they said!
It's Tuesday and shit is still broken!
FML -
PSA: negate your tests and make sure they fail!
I have what I thought was a weird and slightly paranoid habit. When I write tests sometimes just as a sanity check negate the assertion to make sure the test fails and isn't a false positive. Almost always fails as expected.
But not today! Turns out I had forgotten to wrap my equality check in an assertion so it would always pass. It freaks me out to imagine pushing a test that always passes not just because it doesn't do its job, but could also obscure a bug and trick me into thinking it works differently than it does. Broken tests are the worst!
But it pays to be paranoid. -
I'm facing big issues on one of my apps and luckily a user is helping me doing some tests as I can't reproduce the issue. He just sent me an email and guess what?! He wrote "happy weekend". No. It's not going to be an happy weekend for me.1
-
Have you ever installed libc++?
If you haven't then i warn you.
When libc++ installs it does a lot of tests and it takes fucking forever!
What the fuck!
What are you even testing? How long patience people have?
And sorry for not screenshoting. I dont want to accidently interupt their "testing"7 -
Note to self: Pointing your tests at a non disposable DB will cause very very bad things to happen. No idea what the flying fuck I was thinking - but praise to the data gods it wasn't a production elastic!
-
Listened for about a half-hour yesterday to DevA ‘beat down’ DevB writing a console app for trying out a proof-of-concept idea he had.
DevB: “What’s the URL of the development server?”
DevA: “Why? What are you doing?”
DevB: “I’m needing to throw some messages to it so I can capture data for something I’m working on.”
DevA: “How are you calling the service?”
DevB: “I wrote a console app”
- you could almost hear the eye roll -
DevA: “A console app? Why in the world would you write a console app?”
DevB: “Oh..um..no reason. I just need log some test data for something I’m playing around with. How should I do it?”
DevA: “If it’s test data, you should have wrote a unit test. You see, unit tests …”
- yammer on and on for about 5 minutes about the virtues of unit tests…never really explaining anything -
DevB: “Yea, I’m not needing to test the result or anything. I just need to log some data.”
DevA: “Then you should use a unit test for that, not a console app. With a unit test, you’ll be able to validate the data. That’s what unit tests are for. Microsoft should have never put in console apps in Visual Studio. It just leads to bad coding practices.”
DevB: “Um…I don’t care. It’s a console app because I just need data…thanks anyway”
Today, DevC was talking to DevA
DevC: “Charlie is testing the order module, but there isn’t any test data. Do you still have the data generating script?”
DevA: “Oh yea, I’ll send him my console app that populates the database.”
It was all I could do from screaming “You stupid –bleep-er!! What the f–bleep-ck was all that yesterday?!”, but none of my business. Better to devrant about it than start a fight. -
I have some phone interviews coming up next week but I've never had these before. Usually I do online tests, shared code, or in person as I'm deaf.
This time I just want to try using a voice relay, so v basically whatever the person says it's transcribed... So wondering what do you actually talk about in these "quick calls"?
Party of the reason I don't like phone is because there are a lot of technical terms which will probably screw it up... But just wanted to give it a try and not 100% interested this time...
Was intending to, applied, then other things came up so now not so sure, some came back so just gonna wing it for the experience I guess1 -
I've lost hope in my precision at this point:
We've updated our website to have X feature. The X feature was implemented, tested and even had unit tests... The worst part when I've lost hope? Both unit and the actual code had the same mistake in them. What was the mistake? Well...
if($variable = 'something') {}
Yeah... Read it carefully... We've always had the same case and only noticed it after 3 months when it was attempted to extend.
Funny enough, few users were harmed but no actual reports of an issue came to us.
Since then, I'm always triple checking that I have the correct amount of `=` to avoid further fuck-ups8 -
My boss: Write unit tests for this angular app
Also my boss: what do you mean it will take months to write the necessary mocks for our 177 specs
Also also my boss: why would you need to mock anything for a unit test
Also also also my boss: Just let each component import all the other real components, nevermind that that's an integration test and not a unit test8 -
When a bunch of unit tests start failing locally because the AWS secret key got rotated.
oh wait...
THOSE AREN’T UNIT TESTS!!!
Unit tests do not depend on any external system, that includes AWS...
AAARRGHHHHH1 -
This is not joke but fact
More than a year ago I write code without tests, I must confess its frustrating trying to debug without proper testing. testing is painful I must admit but you can't compare the confident you have on your code with the pains when writing tests.
About a year ago I wrote a whole software without tests and this words from a friend hunted me everyday till date he said, what cannot be tested cannot be trusted. Wise words.7 -
We use a third party paid company to produce a service and give ongoing support for it, which all our revenue streams depend upon. They are shit and their service is shit. Here's how my conversation about testing went today.
Me: 'hey X wrote an integration test project for the service. It shows the service is broken 50% of the time. We should give their team access to it and have them run it as part of CI'
Colleague: 'They are too shit to setup CI'
PM: 'we are stuck with them so there is no point. It is what it is'
Boss: just ignores me. Not even a reply.
Some days later
Head of QA: 'Hey Dev and QA are broken'
Me: 'because their service is broken. I made so and so suggestion before but it was rejected. We will just have to accept Dev and QA are broken 50% of the time'
Head of QA: 'no we cant'
Me: 'ok so we should setup the tests to run by giving them access'
Head of QA: 'No we shouldn't. The tests can only be used by us and if they break it tells us so we can act on it, or choose not to'
Me: 'We would not want to act immediately on all our revenue streams breaking? Yes we can reverse engineer their client and fix errors as they occur, or we could just have them run the tests and a team our company pays for can stop adding breaking changes to their own API every other day. Right now it has been broken for 2 weeks.'
Head of QA: 'in an ideal world we would have an internal team so you're wrong'
Me: :)
I really don't understand how they can come to such a conclusion. Am I missing something or am I surrounded by total fucking idiots?2 -
"I don't see the point of writing tests on this project. It's just a waste of time. "
3 months later:
"I don't know what's broken and every time I change something I don't know what it could possibly break?"
FFS.1 -
I'm unmotivated and tired today. I'm just running tests in different branches to see what bug I can find... and since the testing take 5 minutes to complete, I just watch videos in between...9
-
Making calls, meetings, and "brainstorming" half-baked features or designs or any other slop bullshit for 12 hours a day?
Wow, you are an impressive "startup bro"!!!
Coding, testing, running emulators, tests, reading technical documentation, ensuring product success in the real world, and implementing efficient full stack software for 12 hours a day?
Fuck you!!!
These are the expectations of management. Just remember, what they do is "extremely difficult", but you are simply just a resource queue that takes input and converts it to real-world implementation.
Give me a fucking break -
You may know I love to hate tests. Well not the tests actually, what I hate is the TDD culture.
DBMS schema in my app dictates a key can either have a value, or be omitted - it can't be null, and all queries are written with that in mind (also they're checked compile-time against schema). But tester failed to mock schema validation, inserted a bunch of null keys with mock data, actually wrote assertions to check those keys are null (even though they never should be), and wanted me to add "or null" to my "exists" queries.
No, we don't need more tests, and you're not smart with your "edge cases" argument. DBMS and compiler ensure those null values can never exists in our DB, and they're already well tested by their developers. We need you to stop relying on TDD so much you forget about the practical purpose of the code, and to occasionally break from the whole theoretical independent tests to make sure your testing actually aligns with third-party services some code uses.
And no, we don't need more tests to test your mocks, and tests to test those test, and yo dawg, I heard ...5 -
I'm genuinely shocked at the number of people I see on here bashing automated testing as a waste of time, simply because my entire career has taught me the opposite (and it's usually only non-technical managers I see who don't want to see "time wasted" writing tests.)
I'm also just as genuinely curious - what do you guys do instead? Just don't test and deal with production issues as they occur? Pass it off to a separate UAT / human-based testing department and let them sign it off? Assume that because you're using Haskell / some other discipline it'll work if it compiles?14 -
Cocktail for disaster:
- TDD
- Mocking
- Multithreading
- Averagely well written, testable code
- All tests pass
- One test methods still shows some vague stacktrace in a worker thread ❌ but the test passes ✅
- Run only that test method and no stacktrace.
So I've been pulling my hair for the last two days trying to figure out what was throwing in that test method. Turns out that thanks to the multithreading going on, some other, similar method threw the exception in parallel. And apparently a different test method was already running when the exception was finally caught.
🖕
When I discovered that, it was fixed in a minute. 😭1 -
?rant
We bought an expensive middleware which helped development speed and stability a lot. Something did not work and after a week I located the bug in the middleware. Support was adequate and the bug got fixed after my report.
I'm not mad at the developers, because bugs happen, and this one was hard to catch, even with tests.
On the other hand I have to explain my boss what took so much time.
It really wasn't my fault, but I also don't want to shame the middleware company, because it will make it harder for me to buy their stuff (and I quite like their products) or even any software at all. -
It's been broken in production for two weeks, and you want to tell me it's "drop everything urgent" now? Is it important? Yes. Is it urgent? No.
Also, how the fuck did you not know this was broken for two weeks, and what the hell do you want me to do about it now? It's your codebase, it passed all the tests in staging AFTER I made my changes to the infrastructure.1 -
Yeah so I quickly hacked stuff together. Why make it beautiful before I know whether it will actually do? Hack now, refactor later!
Yeah and then that moment in refactoring where main() gets under 700 lines and I don't know whether what I'm feeling is joy or despair. Gaaaahhhh!
At least I have also written automatic tests so that I can see when something breaks.3 -
Things I love today.
Totally love. Like kick in the balls with testicle torsion love. Picking my eyeballs out with a spoon... I think you got the idea.
Getting updates of other managers, as I'm busy with other stuff.
More or less goes like this:
Flaky tests. Since weeks...
Ain't nobody got time for that.
🤬
I don't wanna upgrade that version to the next major version, cause then I'd have to do tests... And the tests are flaky.
🤬🤬
I wanna have shiny new thing XY, but NOONE wants to upgrade to next major version so we cannot have that
🤬🤬🤬
Oh we just crushed the live cluster cause there's this PR everyone constantly ignores cause the tests are flaky....
🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬
Good thing I'm busy and just getting all the updates via the gossip mill...
I'm just prolonging my current tasks as I really don't wanna have to fix that mess.
My fix would be probably eye for eye, tooth for tooth.
...
Problem is.... I'm slowly getting into trouble because some of these fixes would be much needed for my task...
Why do I have always to be the bad cop in the company -.
I think I'm gonna ask HR what applying electro shocks would cost me, cause I think that would solve a lot of problems.
10 kV for every stupid answer.
Smells like bacon!4 -
I've been working on this fucking instagram connector for 4 weeks now, mainly due to idiotic red tape
Now the time has come to get it approved. I'm supposed to let them know how to test the connector with a test user. but FUCKING facebook's test users don't even work as test users! their own spam catcher identifies their own test users as bots!!!!
I mean what the fuck!!!! HOW AM I SUPPOSED TO GET THIS APPROVED IF YOUR TEST USERS DON'T FUCKING WORK AS PART OF THE TESTS
AAAAAAAAAAAAA THIS IS FUCKING INFURIATING3 -
In the 90s most people had touched grass, but few touched a computer.
In the 2090s most people will have touched a computer, but not grass.
But at least we'll have fully sentient dildos armed with laser guns to mildly stimulate our mandatory attached cyber-clits, or alternatively annihilate thought criminals.
In other news my prime generator has exhaustively been checked against, all primes from 5 to 1 million. I used miller-rabin with k=40 to confirm the results.
The set the generator creates is the join of the quasi-lucas carmichael numbers, the carmichael numbers, and the primes. So after I generated a number I just had to treat those numbers as 'pollutants' and filter them out, which was dead simple.
Whats left after filtering, is strictly the primes.
I also tested it randomly on 50-55 bit primes, and it always returned true, but that range hasn't been fully tested so far because it takes 9-12 seconds per number at that point.
I was expecting maybe a few failures by my generator. So what I did was I wrote a function, genMillerTest(), and all it does is take some number n, returns the next prime after it (using my functions nextPrime() and isPrime()), and then tests it against miller-rabin. If miller returns false, then I add the result to a list. And then I check *those* results by hand (because miller can occasionally return false positives, though I'm not familiar enough with the math to know how often).
Well, imagine my surprise when I had zero false positives.
Which means either my code is generating the same exact set as miller (under some very large value of n), or the chance of miller (at k=40 tests) returning a false positive is vanishingly small.
My next steps should be to parallelize the checking process, and set up my other desktop to run those tests continuously.
Concurrently I should work on figuring out why my slowest primality tests (theres six of them, though I think I can eliminate two) are so slow and if I can better estimate or derive a pattern that allows faster results by better initialization of the variables used by these tests.
I already wrote some cases to output which tests most frequently succeeded (if any of them pass, then the number isn't prime), and therefore could cut short the primality test of a number. I rewrote the function to put those tests in order from most likely to least likely.
I'm also thinking that there may be some clues for faster computation in other bases, or perhaps in binary, or inspecting the patterns of values in the natural logs of non-primes versus primes. Or even looking into the *execution* time of numbers that successfully pass as prime versus ones that don't. Theres a bevy of possible approaches.
The entire process for the first 1_000_000 numbers, ran 1621.28 seconds, or just shy of a tenth of a second per test but I'm sure thats biased toward the head of the list.
If theres any other approach or ideas I may be overlooking, I wouldn't know where to begin.16 -
The feature was to parse a set of fairly complex xml files following a legacy schema. Problem was, the way this was done previously did not conform to the schema so it was a guideline at best, which over the course of many years snowballed into an anarchy where clients would send in whatever and it was continuously updated per case as needed. They wanted to start enforcing their new schema while phasing out the old method.
The good news is that parsing and serialization is very testable, so I rounded up what I could find of example files and got to work. Around the same time I asked our client if they had any more examples of typical cases we need to deal with, and sure enough a couple of days later I receive a zip with hundreds of files. They also point out that I should just disregard the entire old set since they decided to outright cut support for it after all if it makes things simpler. Nice.
I finish the feature in a decent amount of time. All my local tests pass, and the CD tests pass when I push my branches. Once we push to our QA env though and the integration tests run, we get a pass rate of less than 10%.
I spend a couple of days trying to figure out what's going on, and eventually narrow it down to some wires being crossed with the new vs. old xml formats. I'm at a loss. I keep trying to chip away at it until I'm left with a minimal example, and I have one of those lean-back moments where you're just "I don't get it". My tests pass locally, but in the QA environment they fail on the same files.
We're now 3 people around my workstation including the system architect, and I'm demonstrating to the others how baffling and black magic this is. I postulate that maybe something is cached in my local environment and it's not actually testing the new files. I even deleted the old ones.
"Are you sure you deleted the right files?"
"Duh of course -- but let me check..."1 -
Holy. Shit. Tests. I am testing. All week. Nothing but tests. I am one with the spec. You know what I realised today? Tests are a bit like life. Life is just one big spec suite that takes 75 years to run. Except there's no prod environment at the end of the DMT tunnel waiting for our green pass docket to say 'take me Lucifer, you absolute visionary: I'm ready'. We're all just a spec with no application. We're doomed. Nothing matters. I need to lie down4
-
Okay, wait, is it a common practice to push changes to master that you KNOW break some other features? I always assumed that that's what branches are for and master should be the "to the best of our knowledge it should be production ready"? But apparently in this company you need to hunt for the right revision, interrogating people why suddenly nothing works on your end and half the time it's "oh, this guy has been working on something and it broke half of the stuff others have been working on and isn't covered in tests yet. Use revision 21xkcd7a"7
-
A friend of mine is youtuber and he does a lot tests on phone ( call him X)
Another friend of mine hates Apple product. Partly because he can’t afford it (call him Y)
whenever X wants to do a WATER RESISTANCE TEST, Y would go: “Lets fuck Iphone”
whenever X wants to do a HEAT RESISTANCE TEST, Y would go: “Lets fuck Iphone”
whenever X wants to do a DROP TEST, Y would go: “Lets fuck Iphone”
One fine day, same happened and X got a bit red. X says: Y come here. Closer, a little more ( few centimeters away now). “Are you fucking mad or what?”2 -
I did one of those shitty logic bullshit tests these a few weeks ago. It was fucking dumb. Was told to write an algorithm to test when an egg would break if it was dropped off a ladder with 100 steps. An egg would break if you dropped it without being on a ladder. Am I right? The guy was like yeah but what if it didn't? I said Well it would. Eggs are fragile. How about you go away with your fictional fucking logic and ask me some proper question that test my actual coding knowledge instead of trying to pony about on your high horse. Cunt!7
-
Our favorite ticket system blokes are back with a big fat update for their software.
What changed?
All workflows are fucked because everything is somewhere else suddenly!
Half of the features suddenly stopped working!
Variable formats in forms have been changed from {} to [] without reason, migration or warning! Sorry, {Username} ¯\_(ツ)_/¯
Half-assed features that don't work half of the time have also been added!
Fucking great!
Who beta tests this shit? Nobody?2 -
My old boss who somehow has gotten his small team of 4 PHP development contracts with Vodafone and Tesco etc. No QA, no tests, no frameworks allowed.
Sets random deadlines and used to suddenly drop demos on me for projects I'd just started and he had no idea of the state of them. Needless to say one project I was so rushed with no idea what I was actually making (for real) that I got sacked. -
The moment you realize that you have successfully beaten reality with your unit-tests...
There are unit-tests for ...
... the api returning a 408 Http StatusCode when an internal request times out.
... the react app take this status-code and fires an action to display a specific error message for the user.
Every bit of code runs just fine.
Deploy this hell of an app on the server. Dandy Doodle.
Do a smoketest of the new feature.
FAIL!
Chrome starts to crumble during runtime. The api Request freezes.
Firefox takes the 408 api response but fails to interpret it in react app.
So I began to wonder, what the hell is going on.
Actually I recognized that I had the glorious idea to return a clientside error code in a serverside api response.
Glorious stupidity :/
Finally I fixed the whole thingy by returning an 504 (Gateway timeout) instead of 408 (Clientside timeout)
Cheers!2 -
"I don't think we should be playing with our privates {variables} like that" - framework designer
= context =
It was noticed that we have too many setter functions to change private variables just to do unit tests. So we had a small meeting to discuss what to do about this.
Options:
- don't do the test
- ignore till another time (ie: keep the functions till its a problem)
- put the variables into a provider
- use reflection (the above quote was a reaction to this option)6 -
Developed a feature 4 weeks ago with a lot of requirements from PO, even more from QA, wrote beautiful code/tests, was actually happy after deploy since everything worked beautifully.
Sales increased a lot because of this.
Story created in Jira today by mentioned PO: As a PO I want to have that feature removed because it doesn‘t work in IE9. PO decides so I had to do this.
So: What exactly is the best way to hide a body?3 -
I'm very sad. I had to do 5 challenges in Hackerrank for a job and I managed to complete only 1 in the allotted time.
What makes me sadder is that in one challenge, the testing the compiler did was different than the challenge description (getting me failed tests).
Damned job hunting, I'm losing hope with each passing day... 🙁2 -
Stop commenting out code blocks!
Either fix your shit or delete it.
I am open to argue what fixing may mean, as it is perfectly fine to make your broken code not reachable, e.g. via feature flags or skipping certain tests. Yet never ever should you comment those blocks!
So you say you want to keep it for historic reasons? You know, that is why we use version control! If you ever need certain functionality back, you can restore that state.
Each decent IDE also offers a local history where you can even restore code blocks that weren't even pushed or committed. So use that!
Commenting out test cases is a really bad habit, as you have no reminder that you shall restore it.
And no, a TODO and a FIXME won't count as a reminder as you have to actively look for them. And we all know how well that goes, don't we? (One time, I found a typo of a `TDO`. So even with a regular lookup for TODO, stuff will slip.)
Each test suite offers you ways to skip tests if there are valid reasons why they should not fail the build temporary and they offer colorful feedback. Yes, that means that your tests won't be green, but guess what: That's a feature! They shouldn't be.
That yellow is a fine reminder, aka warning!, that you should really fix your shit.
Commented code screams: "I DON'T KNOW WHAT I WAS DOING!" and it confuses the hell out of other developers ("Was this commented because of debugging purposes and should be active again or can I safely delete this!?") and adds verbose crap to the code base.
If you find yourself to be in a place that you comment code a lot, I also argue that your workflow is broken.
When you are using a decent debugger, there shouldn't that much of a need to comment in and out a lot of code in order to reason about your code-base.3 -
Hi guys!
Hopefully going to be heading to a job interview as a Junior Front End Developer over the next few weeks. Primarily a web designer but taught myself to code as well. The job uses HTML, CSS, JavaScript and Angular. I've heard a few people mention tests companies use in interviews, has anyone had any experience with these? What type of things should I prepare for?13 -
Anyone else like... REALLY bad at algorithms and logic stuff?
I just hate them so much.
Tell me to build something and gg done. But all these tests for jobs freak me out.
Like. It probably ends up being something simple and when it's explained I know what to do but at first I just instantly shut down and can't think.5 -
I'm in this university software engineering course, where the professor decides he need to teach us the entire history of software engineering.
Dude, we were taught how to use SVN in addition to Git. Huh? And for software development processes, we were taught a total of 7 of them. There're: code and fix, waterfall, prototyping, spiral, phased, agile and lean. And the tests are like "list 5 advantages and disadvantages for X, and compare them to the advantages and disadvantages of Y". Wtf dude. I don't mind memorizing things, but the things I learn aren't even relevant (except agile and lean). Nobody would be impressed if I say I know SVN in an interview. What am I doing with my life. Ok, back to cramming this shit cuz i need my GPA. Bye.10 -
If I'm writing an app which has the sole purpose of receiving some data from a server, then sending some other data back (so nothing is stored locally) - what sort of stuff do I write tests for?
Client wants lots of testing to occur, but all of the tests I can think of wouldn't add any value -
Actually, it happened just before my current holidays.
I had prepared a whole system to feed and use a machine learning model. My colleague and some others had been working on a great thing, all encapsulated, all abstracted for my system.
My last day at the office, they had it ready.
I install their thing, load one model and launch one dummy prediction: error. I try with other input data: error
I try debugging a bit more, errors all the way. Knowing them, I asked if they wrote some unit tests.
"Sure we did"
I find the tests, yes there are some. And I notice:
"Hey, I see that in all your tests, you're making more than one prediction at a time (=aka using a matrix with more than one row)
- yeah, and it work fine
- in the project, we're doing one prediction at a time, did you try it with one prediction?"
He tries: error, that was totally what I said.
I started ranting on loosing the scope of the project, why we do tests in the first place.
Then, I grabbed my coat, said "see you in one week" and let them rework their code.
I was so angry at them, it seemed so basic to just check that 👹 -
Me: What if I use navigation props in EF Core, what might go wrong?
*tests API call*
*120 seconds later finally got result*
Me: I better undo my changes and stick with 2 seconds response time O_O -
Me 🤗"Since you know the domain far better than me, can I ask you to help me understand if I managed to cover all the edge cases with these UNIT TESTS?
😒" no no no, you don't need to check for those cases, you already do that in your code"
🤗 "I'm sorry, I must have explained myself badly. I have written these UNIT TESTS exactly to ... TEST if those CHECKS in my code work and what I need is you to tell me if there are additional cases ..."
😫"but you don't need to!!! You already have that logic in your code"
😐😵☠ 🦍💊🔫🔪"you know what? I'm gonna give them a second look. Thanks"
And then I moonwalked out of the room -
I tried to apply to TrippleByte just to see if I could get a job through them...
Their tests are soo hard imo
It's not like I lack skills in programming its just that they require you to have a VERY varied background and only give you about a min to answer each question which can take a slow code reader that long to read without having even processed what the answer may be ;u;
This isn't making me feel good about my white boarding skills since I have yet to be in one of those. I'mma need all the help I can get @_@4 -
Linux users:
What was your distro journey?
Mine is composed of the following time-based list of the primary distros I've used, along with a smattering of flash-in-the-pan tests, including but not limited to Suse, OpenSuse, OEL, CentOS, Sorceror, Vector, Mint, and ElementaryOS.
1998-1999: Redhat 5.1, 5.2, and 5.3
1999-2002: Debian
2002-2005: Gentoo
2005-2007: Debian(I still use it for cloud VPSes)
2007-2019: Ubuntu
2019: Manjaro
2019-Present: Arch11 -
Any professional pentesters or someone working in cybersecurity as a profession? I need some advice. The company I intern with right now wants me to test their web applications for security (they really don't care so much about security). I just wanted to know is there a standard set of procedures or a checklist that is usually followed? I know automated testing is not all that effective against web applications but what are the steps you usually take?
As of now, I have run tests and am now performing a code review but it's in PHP and I'm not really good with it. I'd like to know what more is done as a standard please.2 -
Finally made my node production server stable enough that I could focus on writing tests*. I start by setting up docker, mocking cognito, preparing the database and everything. Reading up on Node test suites and following a short tut to set up my first unit test. Didn't go smoothly, but it's local and there are no deadlines so who cares. 4 days later, first assert.equal(1+1, 2) passes and I'm happy.
I start writing all sorts of tests, installing everything required into "devDependancies," and getting the joy of having some tests pass on first try with all asserts set up, feels good!
I decide to make a small update to production, so I add a test, run and see it fail, implement the feature, re-run and, it passes!
I push the feature to develop, test it, and it works as intended. Merge that to master and subsequently to one of my ec2 production servers**, and lo and behold, production server is on a bootloop claiming it "Cannot find module `graphql`". But how? I didn't change any production dependencies, and my package lock json is committed so wth?
I google the issue, but can't find anything relevant. The only thing that I could guess was that some dependencies (including graphql) were referenced*** in both, prod and dev, and were omitted when installed on a prod NODE_ENV, but googling that specific issue yielded no results, and I would have thought npm would be clever enough to see that and would always install those dependencies (spoiler: it didn't for me).
With reduced production capacity (having one server down) I decided to npm uninstall all dev dependencies anyway and see what happens. Aaaaand it works.....
So now I have a working production server, but broken local tests, and I'm not sure why npm is behaving like this...
* Yes I see the irony.
** No staging because $$$, also this is a personal project.
*** I am not directly referencing the same thing twice, it's probably a subdependency somewhere.2 -
Sometimes, I run tests just because I want a break from writing code. In good cases it's so that I take a moment to think about what I'm going to do next. In most cases however, I'm struggling for motivation1
-
Seriously though, since so many devs I know rant about their QA / test engineers, what would your ideal Test engineer look like?!
I mean sometimes I feel like devs expect test engineers to write them their unit tests too...4 -
It's only August but I already know what I'll be thankful for come Thanksgiving:
1. Our next president.
2. Integration tests.1 -
Me: Where is your unit tests?
Dev: I tested manually and it worked.
Me: What if there are changes to the code in future?
Dev: We'll manually retest the implementation. It'll be fine.
*flip table*1 -
So our Chief Test Engineer left the company because of overwhelming frustration and stress. We working on new stuffs so we test our partly done product with partly done test tool developed be another of our team. His successor started to drop most of the 3rd party tools and workflows and documentations to trash expect this one unfinished test software.
Now he wants that we add more features to this software so it can replace everything he trashed already: run tests, generate test reports, generate documentations and so on.
On top of that he organized a workshop to read all this software's source code together, understand how it's works so we can rewrite the whole software from scratch.
WHAT?!1 -
I'm so sick of "senior/lead" developers pretending they know how to write tests and ending up with these unmaintainable test suites, full of repetitions and incomprehensible assertions.
You should take some time to learn from your mistakes instead of just continuing to write the same shitty tests as usual!!!
Every time I arrive at a new team I spend weeks just trying to understand the test suites for what should be fairly SIMPLE applications!
UNIT TESTS SHOULD TEST UNITS OF CODE!
If your unit test tests seem to be repetitive, they are not unit tests. Repetition is expected in integration tests, but that is why those are usually DATA DRIVEN tests!!!14 -
I’m curious what works for you? Lyrics or instrumental music while you’re working? I find myself preferring instrumental music while I’m thinking about a problem. The music can be technical and busy or super chill, but lyrics always distract me.
Of course, If I’m just half focused and grinding out mock responders for my unit tests then lyrics are fine.11 -
I've mistyped "tests" as "testes" so many times now I'm beginning to think it doesn't really matter.
Investigate failing testes.
Added testes for xyz feature.
Everyone understands what I mean. It's all good.4 -
Killing people is bad. But, there should be a law to allow killing people who don't write proper unit tests for their code. And also those "team leaders" who approve and merge code without unit tests.
Little backstory. Starts with a question.
What is the most critical part of a quoting tool (tool for resellers to set discounts and margins and create quotations)? The calculations, right?
If one formula is incorrect in one use case, people lose real money. This is the component which the user should be able to trust 100%. Right?
Okay. So this team was supposed to create a calculation engine to support all these calculations. The development was done, and the system was given to the QA team. For the last two months, the QA team finds bugs and assigns those to the development team and the development team fix those and assigns it back to the QA team. But then the QA team realizes that something else has been broken, a different calculation.
Upon investigation, today, I found out that the developers did not write a single unit test for the entire engine. There are at least 2000 different test cases involving the formulas and the QA team was doing all of that manually.
Now, Our continuous integration tool mandates coverage of 75%. What the developer did was to write a dummy test case, so that the entire code was covered.
I really really really really really think that developers should write unit tests, and proper unit tests, for each of the code lines (or, “logical blocks of code”) they write.20 -
What a coincidence. This will be that day. Not as dev, but as a student. I know this place called DEVrant, but I'm really nervous right now, because of the tests today. I didn't learn and I'm gonna fail all.
But not the tests the only thing I worry about. I hate this world becouse everybody needs to work hard and there is no break. Rarely you can get some air, but one second later you're in the deep again... I don't know what to say or what to do. This will go in my entire life? This is horrible.
I know. I'm just a student. "It will be harder." you say. But I've had enough of this.3 -
Disclaimer: I am an assclown who makes cobbles shit together and doesn't have a strong/real foundational understanding in the shit I deal with.
So does anybody actually write their tests before they write their code? I see the term TDD (test driven development) bandied around everywhere.
I don't know what the fuck I'm doing or what the solution will be, nor am I confident in it until I've manually tested it seems to be working.
Then I usually write the automated tests if they are easy to do so.
i.e. I won't know what/how to test the thing.....until I make the damn thing
Is this a case of 'git gud' and have the problem "presolved" in your head, before you work on it such that you can already write tests first?
Or is this a case of "aGilE", where everybody says they're agile, maybe does a little bit of scrum (just the pieces they like/find useful, not the entire thing in a dogmatic/religious way), and possibly has never heard of the manifesto https://agilemanifesto.org/12 -
I currently use Github as my git server and have worked a little bit with Travis. Sadly Travis can't deploy to local network targets and that's why I had the idea to create my own basic CI for the local network: It will be a simple nodejs-app and listens to pushes via Github Webhooks. Then it fetches the code from Github and runs a task runner like Gulp over it and tests it with any nodejs testing framework. Then it deploys the compiled, tested and linted app to the local network. What do you think of this idea?8
-
What do you think of online tests (for hiring) with a mandatory webcam?
The webcam part is making me anxious enough to back out.23 -
As I'm on a research/algorithm improvement project at work I'm working pretty much independently. As such I've set up an automated test framework and writing tests for any piece of code I touch.
Today as I was fixing a bug in production area I was demoing my tests to CTO and principal design engineer. They come from a hardware background and have pushed back against automated tests in the past but they were interested in what I was doing.
I WILL DRAG THEM KICKING AND FUCKING SCREAMING INTO THE WORLD OF AUTOMATED TESTS.1 -
And here I am again, reading test cases that basically boil down to:
$testCase->foo = "bar";
$this->assertEquals($testCase, "bar");
$testCase2->foo = null;
$this->assertNull($testCase2->foo);
Why would anyone feel the need to write these kind of tests? They don't do anything. If I set up my mock a certain way, of course I will have that data, esp. if the unit under test only applies the data AS IS. (Funily enough through another component that already has the relevant dummy tests in place making these tests extra redundant and obsolete.)
You would think that one test case with dummy data suffices, yet no, there are like 30 examples that lie to you about apparent business logic cases, yet in the end the way you set up the mock decides what you will or won't get.
What's the point?6 -
Hennies I need your assistance!
My boss has put me in charge (wow yes I was surprised too) of figuring out what a good solution to our current testing nightmare would be. Therefore my questions for you are:
What kind of testing strategy do you work with at your job? Do you use any tools for it? How's the division of unit tests/service tests and/or UI tests?
I'd really appreciate you guys' input on what works (and what doesn't, in case you're living a nightmare with testing daily)10 -
What the fuck is a "pre test"? And why the fuck do you call it if there are no other tests after it? Get your shit together pm!!!!
-
You know what I hate? Git commit messages stating 'fixed tests' or 'fixed docs' or 'fixed integration problems'. You did not fix anything, fuckhead. You updated the code, introducing more bugs as usual. FIXED?! NO, UPDATED! That's what I hate.1
-
So, I have a major deadline coming up and was writing some edge case tests when the gf calls.
I'm already in the "dog house" for beeing an obsesive twat lost in my thoughts and not listening to her so I decide to answer.
She called to vent about some coworker of hers and how she got screwed out of an advertising project.
The moment I heard "let me tell you what she said.." I instantly tuned her out, went into aha, yeah, aha mode and back to my tests (the irony is not lost on me).
Her: blablabla blablabla
Me: aha
Her: and then blablalba blabla bla
Me: wow, aha
This goes on for about 4-5 min up until I heard a change in the blabla pattern.
To self: Oh crap, that was a question!
To self: Wtf did she ask? Quick, say something!
Me: Uhm, yeah, of course!
Her: Yaaaaay, I love you! I'll get the tickets!
To self: aaaaaaaaw crap, what the fuck did I just agree to?!
Me: Sure thing! I'll see you tonight.
Hey everybody, guess who's going to London next week to spend four whole days with her old colledge artsy-fartsy-stoner friends?
I hate those assholes!3 -
I'm at work but not working, at all!
Planning was done very badly, my team finished in a very effective and efficient way, even before the timeline(including tests and all other things).
It's been a month(or so) since I'm not doing anything, the start was cool, I know most of you are gonna say you envy this, believe me, I'm not, I feel useless and the sense I could be fired at anytime increases everyday (my personal paranoia).
What would Brian Boitano do?4 -
What is a cool naming scheme for the servers
for example we have 6 environments for the QC to run their tests, what would be a cool way to name them
I thought of bugs names,since we are a bug reporting company
what do you think guys8 -
Deployed an hotfix without going through QA. Not the worst, but against what I like to do.
And there was time, a long time ago, when tests were a luxury... I know stupidity at its purest 😅1 -
Jesus fucking christ! I've been hired by this bank to improve the quality of their online banking software. Zero unit tests and I'm tasked to make it testable as much as possible.
Guess what? Almost the whole fucking codebase uses static classes everywhere!!! Good luck unit testing that.... what a bummer. It is a challenge though.2 -
The typical university project as a group:
- Discuss/Make somebody create the items in Jira: 2 days
- Implementation: 2 hours
- Tests: What are tests? Do I write them in my main method?
- Review/Someone sees the code: 9 hours
- Staging/Production: No one is ever going to use the "software"2 -
It's impossibru: I'm doing RxJava + RxKotlin + RxAndroid and I'm understanding it.
Somewhat.
My tests pass, at least that's something. It's not yet doing completely what I want, but the hardest part is behind me. 🤩rant rxjava rxandroid reactive programming rxkotlin functional programming learning curve level 9000 rx1 -
Our teacher is such a fucking moron. We wrote a huge fucking test about everything we've learned from him. I've learned like never before for this fucking test. As I wrote it I noticed that what he told us would come in the test, wasn't even in it.
Fast forward a few weeks.
We've got the tests back and surprisingly the average was veeeeery low, BECAUSE HE FUCKING GAVE US THE WRONG TEST. But instead of letting us rewrite it, he will 'Grade our Presentation a bit better. '.
Are you serious?
A presentation is a good grade no matter what and the test counts double.
Everything about this is a fucking joke.2 -
Load tests:
I'm used to do load tests in Visual Studio where it gives which line is exactly your bottleneck. But now I'm using VS Code (visual studio requires enterprise license for load tests :\ no longer have one)
Anyways long story short, what are the best practices for load tests? For me what I'm testing is how much can a given hardware specs handle and when test fails I go back and check if code can be optimized, is this the correct way to do this?7 -
When you write a new project using TDD and your colleague who isn't in to it make all unit tests practically fail and also breaks code style tests and doesn't give a flying monkeys.
His excuse is if you write tests what will test the tests -.-
What would your reaction be to that?2 -
Chrome likes to count teleporting goats, Android tests if the user is a monkey. I like to put "void fish(object look)" in my code and throw the fish where ever I wanna test something.
What are some interesting functions you've added to your code? Has another dev caught your function yet? (mine hasn't been caught yet, yay!)3 -
RANT! Clown VISA developer (you know, the one with ”extensive experience”) has still not finished his task which he was assigned after failing the last one which was easier. I wrote that they would fail and they have not even deployed anything to any environment. Not even dev. They just fuck around on their machines and this VISA guy says some nonsense shit on daily standups using mother fucking big words like it is really some difficult task they are doing. NOTHING has been done. It’s such a moral sink for the team.
When I asked nicely and asked if they have automated test they responded with a yes. So, I just dive into the repo and… no. There is no tests at all.
It is almost like they _think_ that tests automatically ate induced by osmosis or quantum mechanics or something. There is no tests. None. Zero. Why the ”yes”? 🤔
I looked at the commits and I can see no actual brain activity.
It will take a miracle. A miracle I say, to get any productive work out of this guy. What should he do? I mean, what should he actually get paid for? I do not understand. And he walks around in these $400 dollar jackets and coats and shit like he knows stuff.
I am having a really hard time accepting that he actually get paid at all. -
What the fucking fuck. Arquillian you piece of shit.
I have a service that needs to go to production soon, it contains Arquillian tests. The tests work locally but not when going through our new Jenkins pipeline. The error message simply says: "Could not start Arquillian container".
Well fuck you too.
After 3 fucking days of rewriting configs, changing up things and I dont know what else I did, I stubled upon the most hidden error message in the history of error messages, a small little line that says "Could not find or load main class ".
Those 2 spaces are intentional btw, because the fucking error was that when starting arquillian and reading the config there was A FUCKING SPACE too much in my JVM arguments. This piece of shit iterpreted it as my FUCKING MAIN CLASS. Whhhhyyyyy, whhhyyyy. Who the fuck... AAAAAAAAAHHH
Btw I snuck myself on devrant a few weeks back and managed to get my 100++ today. Really love this place 😊1 -
Working on a selenium test suite for a large web app. Nightly tests currently take 3h to finish. At what point do nightly tests become weekly tests??5
-
One of the founders of my startup does not write tests....
Me: we have to all write tests. I explain unit tests, integration, etc.
Him: I do... I have a test that checks if the app crashes or not.
Me: that is not what I meant (writes test because he won’t) 🙄1 -
Today I read a great article on mutation tests, how to use and why they are important. It looks like a great thing, but...
I have never wrote any unit test in any of my jobs. Nobody in my workplace does that. And now it seems like 100% test coverage is not enough (I remind you, that I have 0%), they all should mutate to check if the quality of unit tests is high.
It seems that I'm left behind. I played with tests in my free time, but it seems the more you write them, the better you get at it, so I should be writing them in my job, where I code most of my time. Not only that, of course, I would also want to ensure that what I'm working on is bug-free.
Still, it will be impossible to introduce unit tests to my project, because they are novelty to the whole team and our deadlines are tight. The other thing is, we are supposed to write minimum viable product, as it is a demo for a client, and every line of code matters. Some might say that we are delusional that after we finish demo we will make things the right way.
Did any one of you have a situation like this? How did you change your boss and team's mind?8 -
It was the worst local Hackathon. It's not even a Hackathon either, where the whole event spanned over 2 months.
It was a group entry with me and 4 teammates. Each of them did contribute:
Guy A: criticizes what is built and designed
Guy B: offered financial tips on how to make this thing feasible
Guy C: did UI but in graphics. No CSS file, just bits of graphical elements.
Guy D: family commitments
And then there's me, writing documentation, built the entire project, wiki, drove the project, prepared the presentation slides, tests the framework, unit tests, stuck with stupid problems like SSL, localhost, Google Maps Key and the likes.
And we didn't even win, let alone launch this thing, whatever it is, to anywhere. Never doing group projects again.
I'm flying solo for now -
Now i am given a task to refactor some piece of Predicate code and then update the unit test so it can be compatible and work with new data
WHAT. Is the Fucking point of unit tests if you have to modify them to adapt to new code anyways???
Unit tests exist just so u can stroke ur sausage??? Just so u can give ur ego an orgasm to tell others "hey look at me how good code i wrote that even unit tests are passing!" ???
I always found unit tests sketchy. almost as if its useless and unnecessary. I still get why they are used (some other dev working on feature 2 might break my shit and unit test can save the day) but if thats the only reason then that doesnt seem like a strong enough reason for me
By now im talking about java!
No wonder i have never seen a single nextjs developer ever write a single unit test. Those people have evolved beyond unit testing just as the nextjs technology itself!
This is why nextjs is the future of web and the Big Daddy Dick King 👑 of technology!8 -
It usually starts with a project, a CI pipeline, unit tests, deployment guidelines, and wait - oh crap - what am I building again?
-
I met @miau in England at University, through the only course we shared, Games for the Internet. I really wanted to be her friend because I thought she was pretty cool.
@miau looks incredibly confident. She has humor, imagination and is a really talented programmer.
She, on the other hand, did not want to have anything to do with other German-speaking students to improve her English skills and learn as much about England as possible.
Fortunately, I can be very stubborn. I helped her with her programming tasks whenever she let me and told her what our professor values. A few tests and beers later we were friends.3 -
Well started on a support job about 1,5 years ago. Two days ago I had an interview about a new position in the same company, as a c# programmer. :)
I really hope I get it and I think I will. On Monday they will ask the rest of the crew what they think on the scrum meeting.
I'm just self taught on php so this will be fun. I hoped for this when a took the job, but I didn't think it would happen.
I have worked a lot with the development team the last year, with tests and I have also done some TSQL work so they all know some of my knowledge. But still I'm a little nervous.2 -
A colleague changes the location of a test helper file imported in a bunch of tests. Doesn’t bother to check where that file is imported (except where he’s specifically using it himself).
As a result good dozen tests fail later on. The culprit doesn’t realize. And the rest of us have no clue why.
Multiple people are asked to look into why the tests are failing.
"Ok, who’s working on what?
We’ll create a shared document to track who’s working on what test."
Document is created, people get assigned.
"Hold on, looks like it’s just a faulty import." "Oh yeah same here." "Yeah for me as well."
"Ok we could simply appoint one person to fix all the imports."
"Well I’ve already gone ahead and opened a pull request to fix the test I was appointed to."
"Ah ok, well who can take care of the rest?"
"Wait I also opened a PR."
"Ok so I guess we can each open a PR?" "No we can just have a single branch we can all push to".
"Sure, who’s branch are we using"
"You can use the branch of my PR"
"Guys let me handle this, it’s ridiculous for us to all be doing this separately."
"You’re right, go ahead".
——
The culprit? A senior dev.
What would have literally taken a minute to do (or even no time at all with proper use of the IDE) turned into hours of wasted time. People getting interrupted, having to drop what they were doing to fix the consequences of this guy’s laziness (seriously don’t know what else to call it).
Ok maybe our reaction could have been more efficient, but we never should’ve even gotten to that point in the first place.2 -
I. Fucking. Hate. Tests.
I am writing a module according to a standard and this standard has a test suite. Awesome...this should make development go pretty smoothly especially since their human-readable "specification" is severely lacking.
I get the module passing most of the tests...however there are few I just can't get my module to pass, no matter what...well fuck.
I go digging deeper into the test cases, compare it to source code. What's this? The tests are fucking wrong. There are several other implementations that use this test suite, how the fuck have they not caught this?
Also come to find out, it is not possible to pass *all* the tests in the suite because some are for older versions that have different functionality.
Got to love a test suite that is incorrect and can't be passed 100%
Maybe they need tests to make sure the tests are working correctly.3 -
Spent yesterday working on a card for adjusting a Graph query to properly sort records. Made all the specs. Tests them all. It gets approved.
Rebased today, and the project lead (who made the card I worked on, told me to work on it and approved my PR) put in a sorting scope that's totally different, in order to "unblock" a frontend dev.
After examining it and discussing it, my work was totally unnecessary, and didn't do what we really needed anyway. Closed my PR. Don't feel like doing shit today.2 -
I need help for a dev test.
So the company that I work at is hiring a couple of new devs and they’ve put me in charge for test in order to see if the applicants are any good.
When I was hired there were no tests so I don’t have that many ideas for a good one.
Have you guys any good recommendations for a test or what it could consist of?
I’m thinking of having multiple small tests so if one misunderstands the task it’s not the whole test they fail. Would that be a good idea or not?
It’s for senior and junior web developer.
Any idea is greatly appreciated 😀5 -
I decided to take this week to write unit tests for some code I already finished. I am new at it and I really want to incorporate as part of work. (Damn deadlines).
I am already seeing the good effects. Bugs I didn't catch before are now showing up.
Now I am wondering what I have been doing all these days calling myself a developer... -
I think their should be like tests or any kind of competition on coding kind of thing in devrant.
Or tips related to coding no matter any language most common mistakes etc.That's my idea tho😅😅😅
What u guys say about this?? -
When it's 2:45am and you've just finished rewriting a large piece of your code and all your tests pass. A normal person would probably be asleep already. A sane person would go to sleep.
What would you call a person who stays up at this hour just because he likes the tunes a bit too much? :)
https://music.youtube.com/watch/...
just some good tunes and all the green tests.... :dance:5 -
I am an stupid human being. How many times should I experience the same problem to learn from it? I don’t know why should I possibly be obsessed by latest MacOS updates? This fucking error ruined my day. Those fucking idiot coders in Apple must use some unit tests (including transparent iTerm in second display). Fuck you all. My £1600 Macbook pro is literally useless until some fucking coder finds what is wrong in their NEW update.3
-
This one time I was working for an investment bank and my manager tells me unit tests are good to have feature and we can descope those to meet the deadlines.
What next meeting the acceptance criteria becomes good to Have or delivering the product becomes good to have? -
How do you switch from testing while debugging (functional) to TDD unit tests?
Usually I test while coding by just running the use case and making sure while coding, bad inputs are caught/handled.
But most times I start with a general idea of the structure and what the about should be (which essentially would be the functional test case?)
I don't think about how you can break each part or the functions I need until I need them. Then usually start simple and then refactor. And until I'm sure each time I refactor would require changing the tests?4 -
Context:
I recently joined a team and we are working on a fairly large mobile app using RN, they started a month ago. And I noticed, they don't have any fucking tests and static typings like Typescript.
I have this pretentious team leader that acts like he's the BeSt dEveLopEr in ThE woRld, and act like he always know what he's doing. But in reality, he code like crap, the formatting is shit because the ESLint config is not working, he's not even aware of it until I've fixed it. He's using every BAD Practice available, unused variables and imports are scattered everywhere, etc. And the directory structure is crap and no consistency.
How can I convince this ignorant mofo to use tests and typescript? He believes that adding those will take us longer and cost more money to the client, based on my experience, this is not the case, it's only slow on the first 2 weeks and it is worth it in the long run.13 -
The time that I felt most like a Dev badass was when I had introduced an E2E test framework and added a bunch of helper classes to it so that our QA team could pick it up and write automated tests for the manual tests they had been doing for years.
Sure, the whole department got laid off after that because we had gotten a new CTO and all of my work was essentially for naught, but it made a lot of people enjoy showing up to work for the first time in a long time, and that was what mattered most to me -
What's the most inane excuse you heard for either a developer or management to not write tests?
I have endured these:
Management:
1) The project is fire and forget. It won't need tests.
2) It's a prototype. It won't go live.
3) Writing tests takes longer than without writing tests. You know how to code, don't you?
Developer:
1) I didn't have the time.
2) It was such a trivial method.
3) It's not mockable.5 -
After three months of development, my first contribution to the client is going live on their servers in less than 12 hours. And let me say, I shall never again be doing that much programming in one go, because the last week and a half has been a nightmare... Where to begin...
So last Monday, my code passed to our testing servers, for QA to review and give its seal of approval. But the server was acting up and wouldn't let us do much, giving us tons of timeouts and other errors, so we reported it to the sysadmin and had to put off the testing.
Now that's all fine and dandy, but last Wednesday we had to prepare the release for 4 days of regression testing on our staging servers, which meant that by Wednesday night the code had to be greenlight by QA. Tuesday the sysadmin was unable to check the problem on our testing servers, so we had to wait to Wednesday.
Wednesday comes along, I'm patching a couple things I saw, and around lunch time we deploy to the testing servers. I launch our fancy new Postman tests which pass in local, and I get a bunch of errors. Partially my codes fault, partially the testing env manipulating server responses and systems failing.
Fifteen minutes before I leave work on the day we have to leave everything ready to pass to staging, I find another bug, which is not really something I can ignore. My typing skills go to work as I'm hammering line after line of code out, trying to get it finished so we can deploy and test when I get home. Done just in time to catch the bus home...
So I get home. Run the tests. Still a couple failures due to the bug I tried to resolve. We ask for an extension till the following morning, thus delaying our deployment to staging. Eight hours later, at 1AM, after working a full 8 hours before, I push my code and leave it ready for deployment the following morning. Finally, everything works and we can get our code up to staging. Tests had to be modified to accommodate the shitty testing environment, but I'm happy that we're finally done there.
Staging server shits itself for half a day, so we end up doing regression tests a full day late, without a change in date for our upload to production (yay...).
We get to staging, I run my tests, all green, all working, so happy. I keep on working on other stuff, and the day that we were slated to upload to production, my coworkers find that throughout the development (which included a huge migration), code was removed which should not have. Team panics. Everyone is reviewing my commits (over a hundred commits) trying to see what we're missing that is required (especially legal requirements). Upload to production is delayed one day because of this. Ended up being one class missing, and a couple lines of code, which is my bad (but seriously, not bad considering I'm a Junior who was handed this project as his first task at his first job).
I swear to God, from here on out, one feature per branch and merge request. Never again shall I let this happen. I don't even know why it was allowed to happen, it breaks our branch policies. But ohel... I will now personally oppose crap like this too...
Now if you'll excuse me... I'm going to be highly unproductive and rest, because I might start balding otherwise after these weeks... -
I started a new job, got through on-boarding and took my first ticket. Made my modification to the code base and the tests fail .. each time I run them .. on different tests .. randomly.
What the hell have I gotten myself into?3 -
Need help in Unit Tests,
I've reached a point where tests randomly fail, but if I run that test alone it never failed.
I do have lots of shared data between test functions of the same test class.
What options do I have?
1. Make each function responsible of seeding data into InMemory database?
2. ??? (I don't know what else I can do)
Any help is great :)18 -
cleaning up resources in async tests in rust is... uhhh what the fuck honestly
just wat
wat
just forget about it I guess. ew.1 -
I think one of the great things about this app is how we handle bug reporting. Any time someone posts about a bug, people independently do extensive tests to determine the extent of the bug (or at least what devices are affected), and people nearly always give detailed replication steps. I think this is a great feature of this community1
-
I'm an iOS developer and I cringe when I read job specs that require TDD or excessive unit testing. By excessive I mean demanding that unit tests need to written almost everywhere and using line coverage as a measure of success. I have many years of experience developing iOS apps in agencies and startups where I needed to be extremely time efficient while also keeping the code maintainable. And what I've learned is the importance of DRY, YAGNI and KISS over excessive unit testing. Sadly our industry has become obsessed with unit tests. I'm of the opinion that unit tests have their place, but integration and e2e tests have more value and should be prioritised, reserving unit tests for algorithmic code. Pushing for unit tests everywhere in my view is a ginormous waste of time that can't ever be repaid in quality, bug free code. Why? Because leads to making code testable through dependency injection and 'humble object' indirection layers, which increases the LoC and fragments code that would be easier to read over different classes. Add mocks, and together with the tests your LoC and complexity have tripled. 200% code size takes 200% the time to maintain. This time needs to be repaid - all this unit testing needs to save us 200% time in debugging or manual testing, which it doesn't unless you are an absolute rookie who writes the most terrible and buggy code imaginable, but if you're this terrible writing your production code, why should your tests be any better? It seems that especially big corporate shops love unit tests. Maybe they have enough money and resources to pay for all these hours wasted on unit tests. Maybe the developers can point their 10,000 unit tests when something goes wrong and say 'at least we tried'? Or maybe most developers don't know how to think and reason about their code before they type, and unit tests force them to do that?12
-
I'm overhearing two engineers agree that integration tests are enough and unit tests with mock data are unnecessary while the project has problems figuring out what components are critically misbehaving.
-
Updating WordPress plugins and pushing directly through Test to Live without stopping and doing regression tests on Test first. “It’s just Yoast SEO. What could go wrong?”
-
My experience with a recruiter is for the internship I'm currently half way though the manager that interviewed me said I would be constantly developing tests for code...jumped at this opportunity as I have no prior testing experience 3 months into internship and I haven't seen a single line of code I am studying software development and my skills as a developer are not increasing what so ever I feel but since I'm an intern I'm not sure should I ask to move team or stay put for the rest of my internship and put it down as an experience2
-
What do you guys think of forced linters (checkStyle) on java assignments?
At this University we have a submission system that checks for your code where if a line didn't match the coding specification then it's an instant zero.
Being experienced in programming before going to a university, this somewhat surprised me, it also has unit tests implemented in it where it checks against input and output.
Would love to hear your thoughts on this. Is it too much for people who unlike me never seen code before? Or let them have hell and understand how to deal with it? I personally think it's too much for beginners.3 -
So made this component that my colleagues also use.
Today i checked source control...
What did they do to my creation?
Lines commented out here and there. Features destroyed by rewriting it, instead of just using it. Related unit tests broken of course. It had everything. And why not ask me?
According to Source control they helped each other. Working together as a team, desecrating my code.1 -
How do you think about unit testing/TDD when writing apps? (I'm working this at 3am so might be a bit messy... Just a thought I woke up to).
Whenever I write an app, I don't write unit tests but as I'm developing I may create test functions for specific parts that I run to validate a specific component is working before moving onto the next.
So first, when I get a problem, break it up into components based on the requirements. It's usually sort of input, processor, output sequence.
Where the processor is essentially the core app. And so I start coding it, referring to the input thru an interface, model objects, adding fields as I go along (assume no matter what the input, I will get these before the logic is called). I may add some more interfaces as well for other data I may need but I know won't be going in the first input.
So I write all the logic, functions needed to get a basic app to run that does what I am writing the app for.
Only then do I write a test functions passing in different parameters to make sure the logic and response is what I want and making fixes as necessary. At that point I basically have the simplest version of the app.
(I guess this is sort of like mocking?)
Then build outwards implementing and testing components as I go along and may do some simple refactoring/redesign. (I guess all these tests are functional then, have to start the whole app).
And finally when I have the basic requirements fully complete I will add the "nice to haves" on top via refactoring of specific logic in specific components. Again testing by running the app maybe with simple inputs.
I guess now I'm thinking how do you write unit tests/TDD if the app keeps changing (via adhoc refactorings) as you are creating it? -
What do you guys use to write unit tests in C? I look at some libs such as check, cmocka, gtest etc, but they all seem like way more than I need. Also, I have a hard time to separate test files and source code files (directory structure wise).
Any recommendations?5 -
Be humble. Nobody knows everything.
Keep learning: read books, take Pluralsight courses, go to meetups.
Write unit tests for your code. No really! Write unit tests for your code!
Learn what the SOLID principles are.
Your job does not define who you are, you define who you are.1 -
The rush when all of your tests pass on a problem you've been working at for 9 hours straight is what I live for.
In other news, fuck the change making problem, if I ever see that damn thing again, it'll be too soon. -
Coworker: "Hey, so I discovered this library that automatically brings up and tears down local containers to perform unit tests on data sources"
Me: "Sounds neat"
Coworker: "Yeah, I've been messing with it locally, and it means we don't need to have the data sources installed on our machines or rely on the ones in the testing environment."
Me: "That's good"
Coworker: "Just a shame I had to roll back our testing framework to a previous version and refactor the code in all our other tests as a result."
Me: "Wait what? *looks at documentation* It says they support the newer framework"
Coworker: "Yeah, but I couldn't get it to work. So I'm just gonna make a PR for it, okay?" *Proceeds to make a PR, approve and merge the code before I can comment further on the changes*
Welp, there goes all my motivation to get anything done for the rest of the day.3 -
Start coding a project for version 7.x, everything works in tests. Deploy it on the server and it doesn't work. Checks version and turns out it is 6.x, ask my manager why didn't he tell me before, he goes like so what, do it for all versions.
I go wtf -
New to working with git in a large scale application. I've used it in personal things, but not at an enterprise scale.
"genius" me: git pull origin {{dev branch name}}
"genius" me: why won't any of these tests work?
"genius" me: spends 2 hours working on fixing some tests
actual genius that I work with: Dude, revert that shit and pull from master, the tests will work. Don't pull from {{dev branch name}} because you have no idead what might be there.
This makes sense. Things are started and abandoned in favor of new priorities all the time. At least my PM is pretty cool and didn't freak out that I wasted that couple of hours like at a previous position.
Also, git is far superior to mstfs. Very smooth and easy to use once you get the hang of it.4 -
What a mess ^^
From one moment to another unit-tests on my local machine stopped working.
There was a PHP fatal error, because of insufficient memory.
Actually, there was a ducking "unit"-test of a controller action "log".
This action returns the content of the projects log file...
Since this log file grew over the time, PHP tried to assert the response of the controller action which was sized about 400MB.
C'moooooon guys!
What were your thoughts behind this bullshit? ^^ -
Solved django recruitment tests. Rejected because they seek someone who know django and I said I don’t know django cause I was using raw python, sql and writing async apps.
What I can say ? Thanks, lol3 -
Today I made some tests with flutter, I really liked it :)
What I didn't like was the time that Android studio takes to load, the memory it uses, and the time of gradle builds. I'll be using nvim, so, half of the problems are solved.2 -
Currently in our 4th cycle of manual regression testing for a release and still finding bugs. Automated tests? What are those? That sounds an awful lot like it would take time to implement. Time that could be spent fixing the bugs and getting the release out the door.
When release dates take priority over quality.... -
When comments find their way to class tests:
“TODO: Finish conjugation of montre in the whole text”. I had no idea of the conjugation and finished under time pressure so this stayed in the class test (gave it back last second) and I was well aware of it.
Just wondering what the teacher must have thought. Didn’t say (or write) a word about it tho.
Should see if someone tweeted or posted this (I mean someone wrote a book only with examples of stuff like this)
Idk, I should ask if I’m allowed to write class test in an IDE. And set MARK, TODO, etc. Would make them a lot easier.30 -
I'm using typescript and run mocha acceptance tests. I was confused as to why my tests were failing on the Jenkins albeit they passed locally just fine.
I couldn't find the error. Just after making a pause, implementing something else, I realized what the problem was:
As I renamed a folder from `fixtures` to `tapes` my test run on the Jenkins suddenly claimed to not find the files in `fixtures`. Yet in my code base there was no occurrence of the string `fixtures` anymore and then it hit me like a brick wall:
I have old transpiled files in my outDir, the `dist` folder on the jenkins! Locally, I make sure to run `git clean -fd` once in a while, so I never was hit by it it locally. Yet my jenkins had really old files in the `dist` folder. And just running `rm dist/* && tsc` fixed the entire ordeal.
Well, JavaScript is so 2012 and typescript is the new shit, yet transpiling the code can leave to some quite strong headaches.1 -
I'm trying. I'm really trying to understand you Dagger 2. But every time I read articles, look at source code and just try to understand how your magic works, I end up copy pasting the sample code. And then I don't know what I even did ffs.
Maybe it's so damn hard for me because I don't understand Dependency injection? But I think I do... What can I do to understand you? Please tell me?
Especially when my use case requires nested fragments and isn't just that typical inject fragment to activity sample...
And now I have to fill in all of the injected fields in my integration tests by hand because I can't figure out how to fucking make you piece of shit do the motherflipping injection!! Fuck.
I need painkillers... My head starts hurting1 -
I'm so fed up why stupid fucks who yell to everyone "You must do TDD, because... Reasons!!!!". The fuckers even dare to call themselves " agilists" or "craftsman"...
The only reason to do TDD is to create Good Unit Tests. But by not stating the main purpose, you add a stupid process without add value.... The solution just became the problem!
So what if something goes wrong? Well, you didn't really followed TDD, because TDD never fails!!
So fuck ignorant stupid fuckers!!!!!
Having Good Unit Testing is the aim. TDD is one way to do it. Not THE WAY!!!
Also, stop using the word " coverage". It doesn't mean fuck!! If you know what kind of coverage you are completing, there could be some value...6 -
Recent posts from @kiki and others made me think about tests. So what are your 2 cents regarding integration tests?14
-
Only when the latest feature is implemented, the last bugfix and the last workaround are found, the last unit test is written, the latest CI/CD pipeline done, the customer guy does manual testing and acceptance tests on the staging server and let's them pass and a few days later it's pushed to production...
You will be reminded (again) that shitty customers do exist! A customer is the least capable person to tell you what the customer actually wants and is also the least trustworthy person to test the features he requested...
Holy fuck come on! Just test that shit on the staging Server! One Look could have already shown you that that's Not what you expected!
I checked the logs after that and yup you guessed correctly... The said endpoints weren't even used on staging, only on production...1 -
Ok so I'm working at this bank that hired me as a lead dev to do something about the quality of the software. Now we have CI builds with front end and back end unit tests, sonarqube, coding standards and much more. First release.of our software had only 1 low impact defect! All other software they released in the past always has dozens of bugs.
Now I have this front end guy in my team. He thinks he is really good and actually said my front end skills suck. What?? Wtf you saying? I'm truly full stack and doing front end way longer than he does and already did many many successful projects for awesome well known companies. So he refactores some JS component I wrote. Now this component is very simple but needed to look and behave different on different devices and screen sizes. It was working perfectly. Our tester did extensive tests on all sorts of devices and browsers: worked perfectly.
So, this 'front end king' is now already in the 3rd week of making changes to this component. And still it is not working properly. And he doubts my front end skills?!
Hahahaha go fuck yourself you god damn piece of fucking front end retard!! Everything you make doesn't worl right away and needs at least 4 revisions. Fuck you!2 -
Opinions
Hello, I’m considering building a web framework.
My ideal features would be:
Customizable authentication system(considering using a jwt lib)
Embedded DB(bolt db)
ORM( writing my own)
REST api to DB (via code generator)
Code generator(generation of models and views via cli)
GUI to db(some admin dashboard)
CORS(web service right?)
Why?
Ease of development
Fast prototyping of small-medium web services.
Fun.
My question is, do i have to many things on my platter? Should i narrow it down into less featured framework? What feature should I focus on? How should i benchmark it? Should i write tests for absolutely everything or just for exported methods? What should i take into consideration when developing ORM API, Auth API...
The language is Go
Thank you for your input10 -
Me, taking a coding class in uni:
Purposely cramping everything in as few lines as possible, making the code barely readable, just to screw with the guy who had to correct this mess.
In my defence, the assignment they gave us was garbage. The task descriptions were often ambiguous or even contradictory to what actually was the case ("The InputStream will contain a string of csv data, each element starts in the next line" -> was a malformed single line string) and the automated tests they wrote to check our output where either completely unhelpful because of their meaningless error messages, or sometimes even plain wrong, telling us our output was wrong, even though it definitely wasn't. -
I want to run a theory by you regarding unit tests.
They make up for the time they cost to implement in the long run, no doubt, because when you're refactoring you can easily check whether you broke something.
But: what if you've got integration tests covering almost the entire codebase? For those to succeed the unit tests must succeed as well. So therefore imho the unit tests are redundant.
The only advantage of also having unit tests seems that they can pinpoint the issue more accurately.
Any other advantages? What am I missing? Any thoughts/comments?9 -
What have you suggested at work which sounded like a good idea at the time, but now sounds like a nightmare?
I inherited a nasty old legacy c# desktop app a few years ago, I was a sql developer so it was a steep learning curve, but I’ve tried to make it better, fixing things as I go.
I had the bright idea of mentioning that I would look at starting to add unit tests etc.
It seemed like a good idea at the time, but now I’m not so sure.3 -
You know what sucks when you are in school? When you're writing a fucking test tomorrow about DSL and your fucking teacher is teaching a new fucking topic ONE FUCKING DAY BEFOR THE FUCKING TEST AND THAT TOPIC IS VPN AND ITS COMPLETLY IRRELEVANT TO YOUR FUCKING TEST! And worst of all: we are writing 2 other tests on Operating Systems and LCD Displays too! WHAT THE FUCK HOW SHOULD I LEARN ALL THIS SHIT7
-
Recently we've checked /sprint in HipChat to test batching of sprint status messages. For testing we wrote what first poped into our minds.
One Dev wrote /sprint We're on schedule
Another wrote /sprint Everything is broken, help
How different tests and first thoughts about progress sometimes can be?1 -
So I wrote some tests, 100% coverage on all the changes I've made. But for some reason, it all just feels useless. What is this I'm feeling?4
-
I think maybe I am doing something wrong.
I have this node.js application I am building with typescript and I wrote tests in mocha. Now I need to make some changes which break quite a few tests.
When I run mocha on the command line the errors whizz past. When I worked in java and .net (with junit and nunit) you could just click a test in the ide to run it. So you could 'fix' one test at a time. Also you could just double click on a fail and it would jump you to the code for that test or the exception that failed.
I found this extension for visual studio code that adds a sidebar to visual studio code. It looked good but now I spent the last hour trying to get it to run typescript tests - looks like it doesn't support the compilers argument.
Surely other developers must do this sort of stuff. I am not using an obscure technology stack right? Do you write automated tests for your codebase? What tools do you use? Should I switch ide? switch testing frameworks? -
After two interviews with the people I might end up working with I'm called out for a third interview, this time with the recruiter (external) I've only talked to over the phone... Weird.
He said the interview will include tests, but not technical. Hmm. What can I expect?1 -
I really need help. We are doing some interface files, something like C header files and configurations.
Management is aware of the "unittesting" buzz words and expects me to write unit tests on "header" and configuration files....
I tried to explain that there are no units to be tested, asked which units should be tested but in the end....
What does it actually mean to test definitions of structures, classes and methods?!3 -
Why the fuck do I have to complete situational strength tests related to commercial shit when I'm applying for a Software Developer role? What the fuck is up with companies nowadays? This is why it's a good idea to be your own boss and either do freelance or make your own brand, because these interviewers know jack shit about technology and software and you cannot express your passion nor your knowledge. I'm sick of how bad the employment process is for software developers who are looking for jobs after graduation.
-
Just spend two fucking days debugging a few methods in our program. I used unit tests to call those methods (don't want to navigate through the complete program workflow)...
Yeah, guess what: the test cleanup includes a fucking rollback transaction function. So NONE NADA ZERO FUCKING CHANGES WILL BE PERSISTED. Fuck me3 -
I really hate how steep the learning curve is for testing. I've been writing the same test for a week for a 150 line directive, and it's driving me fucking nuts. Nothing makes sense. No one in the office to help me. Only 10% of engineers here write any tests. I don't know what to do. Overnight they made it a rule that if you want to move up to the next level for software engineers, 80% of your code needs to have unit test coverage. It's just bullshit.3
-
In my company we are constricted to have 100% of f̶a̶k̶e̶ coverage with unit test.
Obviously the test suites are not performing and it takes more than 8 minutes to run 3335 tests.
I know that what I'm going to say is super mainstream but there is nothing comparable to the relief that comes from seeing all tests in green after you did a lot of small changes around the code on Friday.4 -
Question I ask myself : does jUnit is tested with jUnit? What if there is a bug? How to know if the bug is from the framework or the tests cases :o10
-
Struggling to write my Engineering Thesis code. Not because I'm afraid of tech, but because I have no idea what it should do.
I'm testing mobile apps performance, but getting the right idea is pain in the ass. :(
Never been too creative, but always have been over ambitious and lazy.
So the deadline is coming slowly, I have specified my 'tests' (authorization, API connection, heavy calculations, graphics, database handling) and still don't know what my app should do.
And ideas or suggestions what else is to test? -
Today I escape from the clutches of the legacy iOS project ive been stuck in for about a year and a half.
Starting on a new team, totally different stack (TypeScript/Angular).
Its bad that what makes me happiest is that we have unit tests, something thats been missing from my life for so long now. I might actually get to do TDD now.
Life is good. -
Microsoft Web Api:
"you can pick up on some of these implicit behaviours by reading the unit tests for the default model binder."
I don't know what I expected.1 -
How do you do your CI/CD pipeline? Sorry if this is a dumb question. Just wondering how the tests and deployment usually runs. Is it on a per team basis? Is it the whole release getting deployed to Test many times per day? What happens if too many automated tests fail or there is not enough coverage, does it abort the deployment? If so, how can every team get delayed by every issue - is that actually a good policy?
My pipeline is very slow and requires a team of 12 people working in shifts to complete it. I’m not an expert but I know it does a lot of steps and never completes without manual intervention. I would like to help but I’m not sure how bad it is.3 -
Recently I am on my exams and I need to study well, On the other hand , all of the things I am studying has no link to my dream job !! So why should I study it and not to choose what to study .. Even though, I don’t really care and I keep on programming because it’s what I love ..💕🚶🏻♀️, no worries, I still study too.. I like studying and learning new information but I hate tests and exams,,🙆🏻♀️💔11
-
Robert Martin says in clean code, or maybe clean architecture, that one should separate the tests into what is hard and easy. GUI tests are hard and therefore brittle and so we should test against view models.
However on clean agile he says a story is not done until it passes automated acceptance tests which in my experience are always brittle and grow so large and brittle that things grind to a halt.
What am I missing? Are stable acceptance tests possible on the GUI? Should we test only an API?5 -
What do you think about psychometric tests? I doubt a test can define the type of person you are nor your characteristics. I think it's ambigous, unprecise and extremely subjective. Today I was rejected from a job offer because "the psychometric department didn't give their vote of approval". This is the first time I get rejected for that reason, in the past nobody complained about the results of my tests. I don't know if psychometry is useful, but this company is looking for someone different, or maybe psychometry is, in fact, subjective and any fool can interpret your results however he feels like: "Oh, so he likes kittens over puppies, he's a potential serial killer, let's reject him"1
-
Scenario: Enabling yet another python test suite on vscode. No big deal.
I start the test init and discovery. Says it cant find the test files. Okay; usually the issue is there's no __init__.py in the test directory. It's okay we can fix that.
Oh wait it's still not working. Okay well this isnt good... After about an hour of searching, i finally find out that the file that vscode is discovering tests with doesnt exist... In fact the whole testing directory doesnt exist!
Okay so now what do i do... Reinstall? Doesnt work. Reinstall and delete the extension directory? Yes! Victory!
Dont know how i got a half-baked extension download but hey... Could've beem worse. -
Nextjs
I just realized
unit tests and integration tests dont exist in nextjs
So now i wondered
What about integrating AWS cloud functions with nextjs?
What about docker with nextjs?
Kubernetes with nextjs??
How TF do u implement a CI/CD pipeline with nextjs if there is nothing to test?!?!??
Nextjs seems like itself is self sufficient. WTF? Everything has been packed and cluttered into 1 giant pile of horsedump and called Nextjs Framework where you dont need k8s to run it or anything. Might as well then rename this fucking "framework" to GOD of all frameworks since it appears it can fucking do anything and everything without requiring HEAVY DevOps bullshit.
ALL of it can be cluttered in 1 nextjs project and you have a fully functional production working website that can basically do ANYTHING and EVERYTHING.
How???
Am i fucking going insane? Am i missing something here??19 -
Fuck you, BouncyCastle. I really like you but the way you have documentation. It's annoying. Nice name. Cool project.
Here, I'm write Java Docs for JUnit tests! For every damn test case!
So damn less documentation even SO said mind your own business! It's been more than 15 hrs. Not a single reply! I died a little today. They have examples but they are not really "examples". No passion at all for documentation!
You should watch and learn from AssertJ docs. OMFG @joel-costoglia sets standards for code style and docs before pull requests. The examples are LOTR themed for god's sake. I'm not asking for fluent API. I just want docs. What class does what. A simple program structure required.
Dyn4j, deeplearning4J have wonderful docs. Why not BouncyCastle?!!!!! -
I really don't know what to do when I can't get the help that we need.
We use the initial version of Jasmine for unit testing and AngularJS (not 2, 3, 4+, but 1), so it's hard to find any good examples online to create my tests. My coworkers help, but since testing isn't something we do at all (or at least very often), they are unsure on how to help me.
I don't know what to do. I feel very unproductive and not valuable to the company at this time.2 -
Junior Dev: Today I'm porting my (TDD'd) C++ code to C# but having loads of issues.
Me: You should throw away the code, port the tests across and write the code again.
Junior Dev: I think I'll just keep doing what I'm doing.
Me: *triple face plant* -
Okay..
So, what do I have here?
A cross platform mobile app with NO unit tests.
😕
I have to write a big new feature from scratch. (Things can't go wrong, right?)
Started working on it, pointed out problems with the UI/UX designs. The design changed multiple times, still I thought I could finish it by the expected date. And, so I did.
The feature went through testing, and they found bugs. (Surprise...?)
It's already kinda scary to touch someone's code that has no unit tests and no comments. And I think, it's all the more difficult to not introduce bugs.
Also, had to work on the weekend to fix the bugs.
I had some good learnings here, but I'm not sure how I can prevent bugs without unit tests and proper feedback cycle. :/4 -
Spent like all week working on a feature set in a web app, finally got to a point where i thought it was functioning well, ran tests, tests passed.
I was exhausted but happy. All along i have been pushing to my GitLab server. I save my commits and even though exhausted, i am happy as i go to bed.
I wake up, run some errands and my business partner says, eh! Can i come see that new feature set you built, sure, i will be home soon.
I was at the barbershop, trying to look like a human being again. I get home boot my computer and i scream.....
Arrrrrrrrrrrrrrgh
I check GitLab, i check my Git Log and i start to sweat, i was in the air conditioner but it felt like someone turned the heat up.
Git log shows my last commit was 2 days ago, my app is at the state it was 2 days ago and i can't frigging find all i have built.
I need to show this to the client, have no idea what to do now, so stressful. My partner say, you know what, just watch a movie. You built it before, you will do it again.
This happened to him a while ago and i gave him similar advice, it felt wicked hearing it now.
Anyways, i have to build that ish all over again, i do know i wasn't dreaming about having built it. I asked my wife and she said, i did, i was always working. So confusing.
Anyone experienced this before, i have no idea how to find my code.
Help Meeeeeeeeeeeeeeeeeeeee4 -
I have been fixing tests all day and some other dev managed to cause merge conflicts, now my branch is in a permanent state of merge after I pushed with force.. I'm done...
This crisis is also hitting our company and don't know what that's means of me as I just joined...
I'm glad it's weekend1 -
In the beginning I created a CLI script to manage some production tests of our embedded product. Then they wanted a GUI with a single textbox and button. Then they wanted a shortcut on the desktop to that GUI.
Now one guy I know in 'production' insists that I keep adding to the documentation for things outside the scope of the software and more towards what will be sent to other production workers. Some of which includes 'ensure the cables are plugged in'. He says that he and other production workers are dumb and need a bulletproof guide. Fair enough, I say...maybe get a brain also?1 -
As an android dev when I inherited a shitty project thats when I realized what really means to write readable and most importantly testable code. Codebase I inherited wasnt even really that bad it was quite readable, but boy it was not suited for any unit/instrumented tests. im talking spaghetti code.
Nowadays I refactor apps to make sure they are testable instead of spending weeks writing tests for a shitty codebase which was done without thinking about separation of concerns. Clients hate the extra couple weeks on top of request but what can I do, if they want tests they need to work with TDD approach or give extra time for refactors. -
I know unit tests and TDD get a bad wrap but I think they’re both great. The problem is people don’t think about what they’re actually coding.
Today I uncovered a unit test with 100 asserts in it.
And half of them are in a loop.
😳
If unit tests weren’t a thing then the dev who wrote this would still be a shit dev.4 -
Hit Compile and Run almost as many times as you press any other key. Mid-writing tests work well as long as you understand what you're looking for!
-
is laravel app really enjoyable to write ?
i started as a laravel dev. the known story , all code in controllers etc. As i started to improve, fortunately i changed company, and worked with a symfony project. A symfony that looked like java. hundreds of classes, tests, yaml injections , objects for requests, for everything.
I thought that i missed the old laravel days, and i took an extra job on laravel again. I was soooo wrong.
It was not only that the code of the previous dev was inferior to what i am now used, it is that i have to be with an open documentation all the time. Even if the project is in the same version that i have used to earlier (an old one).
You have to check all the time the model settings, the migration, the magic tricks of model mass insert, the castings, the validation rules, why the tests are not finding some routes, why this, why that, how it is written this.
Excuse me, but i think the fun and easiness is far from what they say and what i thought it was. I start to change my mind and believe that inserting the request to a simple php object is more controllable than the gandalf tricks that laravel is doing, and you cannot know if it is worth your time to test it . And more importantly, you do not have to look at the cookbook, all the time@@@5 -
I’ve bombed 2 online tests now.
I got another one coming in so perhaps it will become 3 soon. I’m not sure at what point my mind will stop blanking out.
This feels like a game of grinding more LC until the test happens to ask stuff that is fresh in my head, or is something that I do in my day job.3 -
WHAT GOES AROUND COMES BACK AROUND
Overflooded with tickets about regressions, management finally gave in and instructed us to use integration tests again.
Who would have seen that one coming.
(at least half of these "regression tickets" were not regressions at all, but I'm not going to be the one spoiling the first time management actually makes the right call)1 -
Every time I turn on device mode on Google Chrome devtools I lose my session (I'm assuming it deletes the cookies).
1. Is this just in my local setup?
2. Is there a way to keep my current session every time I turn on/off device mode on Chrome?
3. What other solutions would I have to do live tests of responsive design on my website?
Thanks!5 -
What stack are you using to test your angular app and why?
We’re using Karma + Jasmine for writing unit tests, because it’s the default, and run them on GitLab CI in a Docker container. For UI testing we don’t use the default Protractor but Selenium, because we haven’t found a way to run Protractor tests with a dedicated webserver.1 -
So my coworker asked for help with his work. I understand that sometimes talking about the problem with someone else will help solve the problem, but seriously, don't ask me "How do I fix this?". If you wanted me to help you fix something, go to lunch and let me work on it for a couple of hours. I can't fix something by telling you what to do. I need time to look into the problem myself, do research, and run tests on my own. Telling to do that over your shoulder is a complete waste of our time.
Also, his attitude of complete helplessness is tiring. It's hard to help someone who continually reminds you of how much he just wants to give up.2 -
Me: By mandating code coverage pct. (very high ones) and integration test coverage pct. you are building an ever growing Rube Goldberg machine that you will end up spending most of your time fixing rather than working on the actual product.
Them: (Staring and whispering in the background). Wow, you must be stupid. This is how you created quality software.
...time passes and now most time is sucked into figuring out why all branches have failing integration tests all the time.
Me: I told you so. I've seen it multiple times. How about doing it differently?
Them: (staring and whispering in background). You are stupid. This is exactly how quality software is built. We know what we are doing. You must like waterfall.4 -
A friend of mine gone through 6 interviews, 2 Technical Interviews with tests, 1 personality test, the overall of all of this process was positive . As the recruiter feedback of each step of the recruitment process.
Yet they didn't hire him because they wanted a "Senior senior" as they said.
What does that mean ?
(he already has 6 years of experience and a bachelor's degree. The job is based in holland)5 -
As a developer on the job market, would you rather have a technical assessment like one of those algorithms tests on Codility and other platforms ? Or would you prefer to be tested by building a little project actually related to what you’d be doing on a daily basis if hired?3
-
What music do you like to listen while writing tests, implementing feature, bugfixing, refactoring, coding, scripting?1
-
Upgrading my tech skills.. Once again I feel my personal my personal dev environment and told are much more up-to-date than what I use at work.... Though the book Kim reading is on TDD and was written 3 years ago.
Maybe I should read another on in cloud services and ML... but don't have any motivation for these topics.
I need TDD for work because now we're emphasizing unit test coverage...
I usually only use manual functional tests to verify the final outputs as either the testing framework is broken (JS) or I don't have time to relearn the frameworks for the particular language...
Anyway got off topic... So questions after:
1. Do you ever feel your technologically always more ahead than what you do at work and essentially you bring skills to the job but you don't learn much out of it?
2. How do you test? I actually got into a bit of a argument/discussion with my colleagues about how to implement unit tests. Apparently there are 2 ways to test? Black box vs WhiteBox. She said she tests only Public methods using mock inputs, dependencies. She read online and seems there is an opinion that should only test public functions and if you can't then your app is designed incorrectly, not separated enough.
For me I test the private functions individually (WhiteBox/Java reflection) because the public one is like generateReport and as a whole is like a Pachinko machine, too many unique paths that would need a test case for.
So thoughts? Yes sorry for turning it into a remake I guess...24 -
I've been working on an issue on and off for the past few weeks. The QA tests failed, so the ball is back in my court again. The data our analysts are testing from comes from a mysterious spreadsheet that no one knows where it came from, while my data is coming from some obscure database table. After asking around it turns out that the table hasn't been maintained for who knows how long, and nobody really knows what the data is used for... I feel like a freaking archaeologist.2
-
I just want to test my PHP code using phpunit on GitLab, what am I doing wrong?
image: php:latest
before_script:
# Install & enable Xdebug for code coverage reports
- pecl install xdebug
- docker-php-ext-enable xdebug
# Run our tests
# If Xdebug was installed you can generate a coverage report and see code coverage metrics.
test:
script:
- phpunit Test.php4 -
Ok, look, man, I'm not involved in any part of the product planning. If you need me to write tests for product you're still writing, you at least need to give me a solid idea of what you want it to do. I can't make what you need if I don't know what's needed.