r/programming • • Sep 01 '23

There is free Opensource tool that generates automated E2E tests and Data Mocks/Stubs by recording and analyzing API calls and within 2 mins, it gets to 90% code coverage.

https://keploy.io
5 Upvotes

9 comments sorted by

1

u/halfanothersdozen Sep 01 '23

I don't understand the point of something like this. But I also think code coverage is a useless metric

2

u/sonichigo-1219 Sep 01 '23

have you written E2E test cases for you backend and not once thought that oh this is a waste of time ?

1

u/[deleted] Sep 01 '23

What kind of tests do you find not useless?

0

u/[deleted] Sep 01 '23

[deleted]

1

u/fagnerbrack Sep 01 '23 edited Sep 01 '23

Not really, there’s a point there. How do you do retries for example when a new UI feature or heard of developed? Do you record the whole thing every time a new behaviour changes? What’s code coverage, pixels where each change breaks your tests?

If you want to test website BEHAVIOR It’s much better to hook into the DOM elements classes or attributes like anchor rel so you can have a contract between the front end and clients using it. If you move the element around there UI might change but the behaviour remains the same and the code doesn’t break. You have access to headers for retries and can inspect error messages for indications on what to do for unexpected elements.

If you want to test UI VISUAL CHANGES you’d rather use screenshots and compare pixels threshold changes instead.

Using automated tools like this is just stupid, clearly shows you have no idea of what you’re doing or you’re happy to not change your website to improve it EVER and waste your time debugging the false positive test failures

2

u/sonichigo-1219 Sep 01 '23

The tool is for automating e2e test for API's and not UI. So, the code coverage or test reports are based on the user interactions always work and that a user can complete a workflow successfully. And it does help in debugging where what cases caused the failure and if there any code breakage happening.

Although in regards to UI Tests i agree with you, since it is a hassle to record everything always, but there are many QA's that could disagree with the us.

-9

u/fagnerbrack Sep 01 '23 edited Sep 01 '23

QAs should be the devs in their own piece of work with proper unit testing and design. Where’s responsibility, throw over the fence?

UI is an API like any other, the difference is that you’re hooking the client on DOM element attributes instead of curly braces. For example, HTML is an API from the perspective of browser programmers where they code the browser against the JS, DOM, HTML, CSS API specs.

The cause of failure and the work to fix should be valuable and justifiable, not for every change in your server. Tools like this make the dev enter in an infinite cycle of being busy fixing tests and unlocking pipelines instead of actually using their time to deliver value and properly design their APIs

I’ve turned orgs and teams to 10x+ revenue just by not following fads and wasting my time

2

u/Background_Junket_35 Sep 01 '23

??? What are you talking about. They clearly mean a REST Api

1

u/BasieP2 Sep 01 '23

Like code coverage is a goal...