ijhttp steals focus on mac os - how to run it headless

Answered

When running ijhttp the java icon shows up in the dock and my focus is stolen. I am running dozens of tests at a time, each one running ijhttp.  I am unable to use my computer while running these tests due to ijhttp stealing focus each time it starts. 

I have not been able to find a way to run it headless.

0
4 comments

Hello,

I understand the inconvenience of ijhttp stealing focus while running tests. To run ijhttp headless, you can use the HTTP Client CLI provided by IntelliJ IDEA. Here’s how:

Install HTTP Client CLI:

Obtain the HTTP Client CLI as a Docker image or a ZIP archive.

Docker image: docker pull jetbrains/intellij-http-client

ZIP archive (requires JDK 17 or newer): Use cURL to download the ZIP: curl -f -L -o ijhttp.zip "[^1^][1]"

Once downloaded, run ./ijhttp to see available arguments and check the version.

Run HTTP Requests:

Create an .http request file containing your HTTP, WebSocket, or GraphQL requests.

Run the HTTP Client CLI:

On the host machine: Execute ./ijhttp myrequest.http.

In Docker: Run a container with the .http file

docker run --rm -i -t -v $PWD:/workdir jetbrains/intellij-http-client run.http

The output will show request details, test statuses, and environment variables.
Optional Settings:
Change the log level using -L (e.g., -L HEADERS or -L VERBOSE).
Save an HTTP response to a separate file using >> or >>! in your .http file.
Resolve localhost in Docker with -D option
docker run --rm -i -t -v $PWD:/workdir jetbrains/intellij-http-client -D run.http

Give this approach a try, and it should allow you to run ijhttp headless without stealing focus! 

Hope this work for you.
 

 

 

 

 

 

 

 

 

 

 

 


Best regards,
florence023
Spotify Pie

0

Hello, Stacie Clark

Could you please describe the setup you use in more detail? Is it possible to share a sample project so I can reproduce the issue on my side?

0

I am running ijhttp on the command line. We are not using docker. We are running through dozens of tests, each one using "ijhttp -v <env> -e <env name> <test file>. Using docker adds time and overhead to each test. 

This is on mac laptops both silicon and intel. I literally can do no work while these tests run as each invocation of ijhttp steals my focus

0

Stacie Clark In that case, could you please share a full command line with the needed test file? I can't reproduce the same yet with a few simple runs. Also, in order to avoid any misunderstanding, it would be very helpful to us if you would please share a video along with the materials to reproduce it in a YouTrack ticket.

0

Please sign in to leave a comment.