Fork me on GitHub
#beginners
<
2023-05-22
>
Abhi K00:05:02

Hi All, What's the recommended performance testing tool for testing Clojure HTTP calls, I am trying to setup JMeter but not able to pass path parameters. :message Cannot invoke \"java.lang.Character.charValue()\" because \"x\" is null

seancorfield00:05:39

You'll need to provide a lot more information about exactly what you tried, what your code has around that exception.

seancorfield00:05:30

If your code is failing with a null pointer exception, you probably want to address that first, regardless of jmeter

Abhi K00:05:31

and My JMeter setup is :

Abhi K00:05:49

it not able to recognize the path parameter country_group_id

seancorfield01:05:30

That would pass ?country_group_id=... - it wouldn't pass it in the path info which is what your URL pattern is looking for

Abhi K01:05:15

Okay thanks, Is there a way I can pass http://localhost:3001/api/v1/country_tracking/:country_group_id in the request

seancorfield03:05:06

Your URL pattern expects it to be part of the path

Abhi K04:05:16

yeah it worked, I am using CSV to send these path parameters, thanks much

Paul Sutyrin11:05:36

Achievement unlocked! ))

🚀 14
😂 10
💯 4
😁 2
🥞 2
🐢 2
Noah Bogart13:05:04

I'd like to ignore/silence the printing of namespaces and summary when running tests with clojure.test/run-tests. is that possible?

Bob B14:05:16

it's possible... test reporting uses a report multimethod, so it would be possible to radically alter the way test outcomes are reported - a quick 'report nothing' mechanism would be to rebind *test-out* to a write to /dev/null or whatever, but for fine-grained control, I think you'd need to rebind that report multimethod with a multimethod that does what you want - you could have a look at the junit or tap overrides that are bundled in for examples

👍 2
Noah Bogart14:05:51

bummer but understandable. looks like i'll have to reimplement some stuff

Bob B14:05:00

well, you could default the dispatches that should remain unchanged to just call the default and only override the ones where different behavior is desired

Bob B14:05:55

e.g. (defmethod my-report :default [m] (clojure.test/report m)) - this should give you exactly the default behavior until/unless some other defmethods override specific test events, e.g. :begin-test-ns and :summary

Noah Bogart17:05:58

good call, that solved it for me, thank you

👍 2