534
top 50 comments
sorted by: hot top controversial new old
[-] dfyx@lemmy.helios42.de 94 points 2 months ago* (last edited 2 months ago)

Surprisingly, yes, I do. Cucumber is a testing tool ~~for ruby applications~~ for a whole lot of programming languages.

[-] Drewmeister@lemmynsfw.com 34 points 2 months ago

Yeah, we use gherkin, which is a variety of cucumber. Programmers name things weird. Java is a coffee bean and C is just a letter; they've just gotten big enough that people recognize them now.

[-] dfyx@lemmy.helios42.de 12 points 2 months ago

Java is also an island

(Sorry, small inside joke for German-speaking Java programmers)

[-] Valmond@lemmy.world 2 points 2 months ago

And slang for coffee, which is some old tech too IIRC

load more comments (1 replies)
[-] UnderpantsWeevil@lemmy.world 8 points 2 months ago

C is just a letter

It's the successor to B, which was derived from BCPL ("Basic Combined Programming Language")

Incidentally, C++ is a reference to how integer values are iterated in C. And then C# is a pithy take on C++ wherein you've stacked two rows of plus signs on top of each other.

There's often some rhyme or reason to these names.

[-] JokeDeity@lemm.ee 2 points 2 months ago

I found this interesting, was there an A?

Proceeds to go look it up while still hoping for your knowledge

[-] Omgpwnies@lemmy.world 8 points 2 months ago

Gherkin is the syntax, Cucumber is a specific implementation.

[-] Shoe@lemm.ee 4 points 2 months ago

Have always personally seen Gherkin being used with Cucumber, as I believe that they're two parts of the same whole, but I'm happy to be corrected if wrong :).

My understanding is that Gherkin is the syntax used to write the scenarios / acceptance criteria, whilst Cucumber is the tool that interprets said scenarios and executes them as automated tests.

[-] sugar_in_your_tea@sh.itjust.works 4 points 2 months ago

There are only two hard things in Computer Science: cache invalidation and naming things

-- Phil Karlton

[-] kraftpudding@lemmy.world 3 points 2 months ago

Java is an island

[-] Dindonmasker@sh.itjust.works 2 points 2 months ago

I wonder what A and B looked like XD

[-] Th3D3k0y@lemmy.world 1 points 2 months ago

With capybara and selenium

[-] peregrin5@lemm.ee 32 points 2 months ago* (last edited 2 months ago)

Eating, preparing, or inserting? The answer is yes.

[-] edgemaster72@lemmy.world 10 points 2 months ago

Careful, they might rule you out for being overqualified

[-] sugar_in_your_tea@sh.itjust.works 2 points 2 months ago

Demonstrate doing all three in the proper order. You get one cucumber.

[-] qwestjest78@lemmy.ca 20 points 2 months ago

It's a terrible time right now. I've applied for over 100 roles this year and only got 3 interviews. Interviews went well, but you never move on. Likely they had someone in mind for the position already.

I think I'm close to reaching out to one of those temp agencies and try to find a year contract somewhere with the hope I end up getting a permanent offer somewhere.

I have 10 years experience in operations and finished a BBA a year ago and it has not amounted in any new opportunities sadly.

[-] Imgonnatrythis@sh.itjust.works 10 points 2 months ago

Just keep working on your cucumber. Things will come around.

[-] DerArzt@lemmy.world 4 points 2 months ago

Getting onto a short term contract sounds like a good next move.

[-] sugar_in_your_tea@sh.itjust.works 2 points 2 months ago

Something is better than nothing, but keep looking.

[-] JackbyDev@programming.dev 15 points 2 months ago

Yes, I actually do. It's a behavioral driven testing framework. I love the idea of it but hate working with it because everyone uses it improperly.

What the steps in a scenario should look like:

Given a user has a bank accout
And the account has a balance of $10
When the user attempts to withdraw $20
Then the transaction should fail

How everyone I've worked with uses it:

Given the system is setup
Given the user TESTUSER1
Given load TESTDATA1
When the user sends a request
    ACTION | AMOUNT
    WITHDRAW | 20.0
The the response should be 400
    STATUS | MESSAGE
    Failure | Not enough funds
[-] sugar_in_your_tea@sh.itjust.works 1 points 2 months ago

Maybe that's why I hate using it, or maybe I just hate testing frameworks that do more than run tests. Here's what I want from a testing framework:

  • run tests in classes or modules
  • report output with some configurable name (javadoc comment, Python Docstring, etc)
  • some way to parameterize tests with different inputs
  • organized output that shows what failed
  • if it's an integration test, keep track of failures over time

Our QA uses cucumber and it works for them, so I only whine when I need to deal with it.

[-] JackbyDev@programming.dev 1 points 2 months ago

Cucumber can do all of that. Except for failures over time but I've never used a framework for that. CI tools typically track that.

[-] sugar_in_your_tea@sh.itjust.works 1 points 2 months ago

Sure, and my issue isn't that it's capable of my requirements, but simple to use and meets those requirements. Simplicity is a quality all its own.

JUnit provides sufficient output to meet my requirements, so why overcomplicate it w/ Cucumber? AFAIK, cucumber tests in Java output JUinit as well (at least ours does), so what value exactly is Cucumber providing?

[-] JackbyDev@programming.dev 1 points 2 months ago

If you don't want the scenarios that are readable in a business requirement format then it's not worth the trouble. I haven't ever seen anyone use it in that way.

[-] sugar_in_your_tea@sh.itjust.works 1 points 2 months ago

Yeah, I don't get it. The only people looking at the results are devs, so we really don't need the business requirement text.

I could maybe understand if product owners were creating the requirements in the feature files and devs were implementing them in the code, but that never happens. So the whole cucumber library thing we have going on just feels annoying.

It's not the only thing we over-engineer. We have dependency injection when we only ever have one dependency (except in tests, in which case we could just use mocking). We take microservices to the extreme (we just broke out a couple hundred lines of code from a few thosand lines of code service). Our test code is unnecessarily reusable (test code is one place where DRY doesn't really need to apply). And so on. This one in particular is especially annoying because it makes it harder to find the code without providing much benefit.

Our QAs seem to like it, so whatever. I'll still complain though.

[-] thirtyfold8625@thebrainbin.org 1 points 2 months ago

I think there's one question you should answer in order to fully describe your "testing framework": is it being used for "end to end tests" or "integration tests" or "unit tests"? https://k-hartanto.medium.com/testing-pyramid-and-testing-ice-cream-cone-what-is-the-difference-6ddde3876c20

For unit tests, something like https://en.wikipedia.org/wiki/JUnit is useful. For testing a program after it's deployed, something like https://jbehave.org/reference/stable/story-syntax.html is useful. You get different information about your program from each type of testing, and one type can detect issues even if the other didn't, so doing both is useful.

[-] sugar_in_your_tea@sh.itjust.works 2 points 2 months ago

These are for a mix of end to end and integration tests.

I mostly do unit tests as a dev, so our tests are simple enough that they don't benefit from more structure than being grouped by suite. E.g.:

  • AuthService
    • valid user creds can login
    • invalid user creds cannot login
    • non-existent user gets same error as wrong creds
  • UserSettingsService
    • can change language
    • cannot set empty password

These don't have long flows, so there's no benefit to documenting steps (they usually have one step).

My complaint about cucumber/gherkin isn't with documenting steps, it's with managing them in separate files. We have a Service.feature file that documents the scenario and the ServiceTest.java that documents the steps. I don't see the point in having those be separate files, especially since the only people defining inputs and scenarios are the devs (dedicated QA in our case). We occasionally have our BE devs help write a few tests, and every time it's a struggle for them to figure out where everything is. It just feels over-engineered.

In unit tests, we parameterize our tests just like with cucumber, we just do so in the code. E.g. in Python:

@parameterized.expand([(1, 2), (2, 4)])
def test_duplicate(num, exp):
    res = dup(num)
    assert res == exp

I would much prefer something like that in our end to end and integration tests.

load more comments (2 replies)
[-] Thcdenton@lemmy.world 13 points 2 months ago

Testing stuff with cucumber is really cool tbh

[-] sugar_in_your_tea@sh.itjust.works 2 points 2 months ago

I disagree. I'm a full-stack engineer, and every time I interact with our QA test suite in cucumber, I break out in hives. I hate keeping the gherkin feature file up to date with the test code, why so much complexity?

[-] Thcdenton@lemmy.world 1 points 2 months ago

Ah. Yeah to be fair I've only used it on personal projects. I've never had to use it at work. Maybe I'd change my tune after that experience

[-] sugar_in_your_tea@sh.itjust.works 2 points 2 months ago

Or maybe we just use it poorly. It doesn't help that we use perhaps my least favorite language for testing: Java. I've written tons of integration tests, but we just used Python and unittest with some plugins to make output nicer, and it was pleasant enough.

[-] moopet@sh.itjust.works 12 points 2 months ago

This is one of those things where if I was to say, "no, but I know celery", people would think I was being silly.

[-] sugar_in_your_tea@sh.itjust.works 2 points 2 months ago* (last edited 2 months ago)

Well yeah, cucumber is a Ruby/Java/etc testing framework and celery is a Python async task queue framework. Know what job you're applying for, silly.

😁

[-] Muscle_Meteor@discuss.tchncs.de 11 points 2 months ago

Do cucumbers have experience in you?

[-] Deathray5@lemmynsfw.com 8 points 2 months ago

I assume that's what experience with cucumbers was

[-] LeninOnAPrayer@lemm.ee 1 points 2 months ago* (last edited 2 months ago)

Yeah but then they add all these new requirements to be considered "experienced". Every company really wants you to know Cucumber++ but only to spent all your time converting old legacy Cucumber code. It's going to be an awful job to take.

And some of them don't even know that CucumberScript is an entirely different language. No one would ever use CucumberScript in the Backend. It's clearly a frontend only language. But nope. They keep trying to ask you if you have experience with Cucumber++ or CucumberScript for backend work. These recruiters have no idea what they are even asking you. You clearly should be using Eggplant. It's the only thing that will work longterm as your backend requirements expand.

[-] Kolanaki@pawb.social 10 points 2 months ago

"I've had a few inside me, if you know what I mean."

"Ah, good. A salad lover."

[-] MonkderVierte@lemmy.ml 8 points 2 months ago* (last edited 2 months ago)

That some new framework or something?

Edit: yeah, a testing tool.

[-] JakenVeina@lemm.ee 5 points 2 months ago* (last edited 2 months ago)

And here I thought the fact that it's spelled "Cucumber" and not "qcmbr" was the giveaway that it's a joke.

load more comments (1 replies)
[-] AnUnusualRelic@lemmy.world 5 points 2 months ago* (last edited 2 months ago)

At the rate those things get spewed out, you can use pretty much any dictionary word and it'll be the name of some kind of software tool. Probably in javascript.

[-] Randelung@lemmy.world 7 points 2 months ago
[-] thirtyfold8625@thebrainbin.org 6 points 2 months ago
[-] WorldsDumbestMan@lemmy.today 5 points 2 months ago

"Oh" Drops cucumber

[-] pyre@lemmy.world 6 points 2 months ago

required skill for certain onlyfans work

[-] socsa@piefed.social 5 points 2 months ago

Cucumber? I barely know her.

[-] southsamurai@sh.itjust.works 3 points 2 months ago

Fun fact!

Cucumbers taste better when taken in anally

[-] racketlauncher831@lemmy.ml 3 points 2 months ago

*end-to-end

[-] moosetwin@lemmy.dbzer0.com 2 points 2 months ago

That's not what I meant when I said I had taste buds up the ass!

[-] Hupf@feddit.org 2 points 2 months ago

Do you have experience in Word?

load more comments
view more: next ›
this post was submitted on 31 Mar 2025
534 points (98.4% liked)

Funny

10261 readers
1422 users here now

General rules:

Exceptions may be made at the discretion of the mods.

founded 2 years ago
MODERATORS