this post was submitted on 22 Feb 2024
920 points (95.8% liked)

Programmer Humor

19735 readers
431 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Omgpwnies 5 points 9 months ago (2 children)

Python is the language of choice for most test automation

[–] SpaceNoodle 5 points 9 months ago (3 children)

If I can't do it as a Bash one-liner, I'm using Python

[–] Omgpwnies 3 points 9 months ago* (last edited 9 months ago) (1 children)

subprocess.Popen(["bash one-liner"], stdout=PIPE, stderr-PIPE, text=True)

[–] SpaceNoodle 4 points 9 months ago* (last edited 9 months ago)
["bash", "one-liner"]
[–] fluxion 1 points 9 months ago (1 children)

I use perl, but everyone hates me and would rather rewrite my little scripts in python than bother changing a single line

[–] SpaceNoodle 1 points 9 months ago (1 children)

You're right, everyone hates you.

[–] fluxion 1 points 9 months ago (1 children)
[–] SpaceNoodle 1 points 9 months ago (1 children)

The good news is that you can stop using Perl at any time.

[–] fluxion 1 points 9 months ago (1 children)

For quick data parsing you'll have to pry it from my cold dead hands im afraid

[–] SpaceNoodle 1 points 9 months ago (1 children)

That could be arranged. I could bash you over the head with a python.

[–] fluxion 2 points 9 months ago

It's a kind offer, but my head is far too hard

[–] [email protected] 0 points 9 months ago

Grug use go because it easier, faster, and compiles to share with friends of Grug

[–] [email protected] 0 points 9 months ago (1 children)

Depends entirely what tests you're automating. Java codebase? Probably Java tests too. Anything web? Tests will be JS too, etc.

[–] Omgpwnies 1 points 9 months ago (1 children)

Web testing is also done in python. Selenium has support in all major Python test frameworks. I've done SE-only tests in Robot, hybrid SE/Python using BDD with Behave, etc.

Unless I'm testing a language-specific API, I'm probably going to use Python...

[–] [email protected] 1 points 9 months ago (1 children)

I'm guessing that's because you're a python developer though. If you're a frontend developer who knows JS then why wouldn't you use that for your tests? (Apart from the fact that JS is horrible, but you've already accepted that suffering by becoming a web dev)

[–] Omgpwnies 3 points 9 months ago

I'm a test automation developer, I'm not necessarily bound by the platform that the application is written in unless I'm writing white-box tests.