# No Tests Found! when using --dry-run

**URL:** <https://discuss.elastic.co/t/no-tests-found-when-using-dry-run/330458>\
**Category:** APM\
**Tags:** synthetics\
**Created:** [April 20, 2023, 5:53pm UTC](https://discuss.elastic.co/t/no-tests-found-when-using-dry-run/330458 "2023-04-20T17:53:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![spaulovich](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@spaulovich](https://discuss.elastic.co/u/spaulovich)\
**Post date:** [April 20, 2023, 5:53pm UTC](https://discuss.elastic.co/t/no-tests-found-when-using-dry-run/330458/1 "2023-04-20T17:53:34Z")

</div>

`npx @elastic/synthetics . --dry-run` results in "No tests found!"

Omitting the --dry-run param, my journey ran locally without issue.

CLI --help says, `--dry-run don't actually execute anything, report only registered journeys`

Shouldn't I have seen the journey?

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [April 21, 2023, 6:01am UTC](https://discuss.elastic.co/t/no-tests-found-when-using-dry-run/330458/2 "2023-04-21T06:01:49Z")

</div>

Hi @spaulovich,

Which version of `@elastic/synthetics` are you using?

---

<div class="post-metadata">

**Author:** ![spaulovich](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@spaulovich](https://discuss.elastic.co/u/spaulovich)\
**Post date:** [April 23, 2023, 5:42pm UTC](https://discuss.elastic.co/t/no-tests-found-when-using-dry-run/330458/3 "2023-04-23T17:42:08Z")

</div>

Hi Carly, I'm using 1.0.0-beta.43

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [April 24, 2023, 1:17pm UTC](https://discuss.elastic.co/t/no-tests-found-when-using-dry-run/330458/4 "2023-04-24T13:17:38Z")

</div>

Thanks for confirming. I've managed to recreate the issue on a few versions, including beta 43 and followed up internally to get some background. The current implementation requires specification of a reporter, such as the json reporter:

`npx @elastic/synthetics . --dry-run --reporter json`

Sample output:

```plaintext
npx @elastic/synthetics . --dry-run --reporter json
{"type":"synthetics/metadata","@timestamp":1682341232066066.8,"root_fields":{"num_journeys":2,"os":{"platform":"darwin"},"package":{"name":"@elastic/synthetics","version":"1.0.0-beta.39"}},"payload":{"network_conditions":{"downloadThroughput":655360,"uploadThroughput":393216,"latency":20,"offline":false}},"package_version":"1.0.0-beta.39"}
{"type":"journey/register","@timestamp":1682341232066412,"journey":{"name":"My journey","id":"My journey"},"root_fields":{"os":{"platform":"darwin"},"package":{"name":"@elastic/synthetics","version":"1.0.0-beta.39"}},"package_version":"1.0.0-beta.39"}
{"type":"journey/register","@timestamp":1682341232066441.5,"journey":{"name":"My Other Journey","id":"My Other Journey"},"root_fields":{"os":{"platform":"darwin"},"package":{"name":"@elastic/synthetics","version":"1.0.0-beta.39"}},"package_version":"1.0.0-beta.39"}

```

We've agreed having a default reporter when none is specified is more intuitive, so I've raised a [GitHub issue](https://github.com/elastic/synthetics/issues/745) for it that you can follow if that helps. For the moment, while not in the prettiest format, the json reporter should give you what you need.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![spaulovich](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@spaulovich](https://discuss.elastic.co/u/spaulovich)\
**Post date:** [April 24, 2023, 1:34pm UTC](https://discuss.elastic.co/t/no-tests-found-when-using-dry-run/330458/5 "2023-04-24T13:34:08Z")

</div>

Thanks Carly!

That does help and I appreciate the follow-up on having a default reporter.

Best regard,  
Steve P.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 15, 2023, 9:34am UTC](https://discuss.elastic.co/t/no-tests-found-when-using-dry-run/330458/6 "2023-05-15T09:34:26Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
