PARAMUS, N.J. — The lines start forming the night before, as people with glassy eyes and violent coughs try to get tested for the virus. In the darkness, they park their cars, cut their engines and try to sleep.

The backlog for coronavirus testing in New Jersey, the state with the second-highest caseload in the country, has been getting worse, not better, officials say.

So far, New Jersey has conducted over 115,000 tests, about one for every 75 residents. Across the river in New York, the epicenter of the crisis, there is about one for every 40. The tests are a critical tool in measuring the disease’s spread and a requirement for certain forms of treatment. Yet they remain hard to get, and many are actively discouraged from trying.

“It’s unequivocally worsening,” Gov. Philip D. Murphy of New Jersey said recently, adding, “We’ve got constraints in the entire food chain.”