How to say "unit tests are passing"


When [unit tests](https://en.wikipedia.org/wiki/Unit_testing) run
successfully, in English I would say:

> Unit tests are passing.

But how to say that in Japanese?

My Japanese colleagues always say something that sounds a bit like
"ユニットテストXX(tawli)ます". For years I have believed it was "ユニットテストが通ります" but I am
pretty sure I am wrong since Google only has [two
hits](https://www.google.co.jp/search?q=%22%E3%83%A6%E3%83%8B%E3%83%83%E3%83%88%E3%83%86%E3%82%B9%E3%83%88%E3%81%8C%E9%80%9A%E3%82%8A%E3%81%BE%E3%81%99%22)
for that sentence.




Although I think naruto's answer is valid and sufficient, here's some
additional research I did. Below, I'm simply stating that 「ユニットテスト」+「通る」 are
frequently used together, disregarding the difference between
「通る」「通ります」「通っている」 etc.. Sorry to be late.

## 1. 「テストが通る」 is commonly used for "tests are passing" in coding contexts.

I consider myself to be a casual hobbyist programmer (whose mother tongue is
Japanese) and I can confirm that 「テストが通る」 is a valid and the most preferred
collocation for tests passing. What form to use is detailed in nauto's answer,
and I only want to add 「これでテストが通ります」 after fixing problems -- The tests are
passing _with this [patch]_ /This patch makes the test pass. When tests fail,
it's テストが「落ちる」, 「こける」, 「失敗する」 or sometimes 「死ぬ」.

In fact, [google search for
"テストが通る"](https://www.google.co.jp/search?q=%22%E3%83%86%E3%82%B9%E3%83%88%E3%81%8C%E9%80%9A%E3%82%8B%22)
has 47300 results as of today and the top 20 results, 100 probably, are all in
coding context. After [restricting the domain to
github.com](https://www.google.co.jp/search?q=%22%E3%83%86%E3%82%B9%E3%83%88%E3%81%8C%E9%80%9A%E3%82%8B%22+site%3Agithub.com&ie=utf-8&oe=utf-8)
it still has 314 results.

## 2. 「通る」 is among the three verbs most frequently used with 「ユニットテスト」 in
twitter.

We can assume the same for unit tests --- there's no reason to choose a
different verb for unit tests specifically! However, as you have mentioned,
examples of "ユニットテストが通る" seems to be a bit more difficult to find in google.
Google says it has 1470 results of
["ユニットテストが通る"](https://www.google.co.jp/search?q=%22%E3%83%A6%E3%83%8B%E3%83%83%E3%83%88%E3%83%86%E3%82%B9%E3%83%88%E3%81%8C%E9%80%9A%E3%82%8B%22&ie=utf-8&oe=utf-8)
but actually won't show me more than 22 results; only 7 hits for
["ユニットテストが通"](https://www.google.co.jp/search?q=%22%E3%83%A6%E3%83%8B%E3%83%83%E3%83%88%E3%83%86%E3%82%B9%E3%83%88%E3%81%8C%E9%80%9A%22&ie=utf-8&oe=utf-8).

I searched for "ユニットテスト" in twitter, where many Japanese tech people are
active, and counted which verb is used together. With 65 most recent hits, the
result was as follows:

  1. 書く (ユニットテストを書く・書ける・書いた, etc.) _write_ : 13 times 
  2. ない (ユニットテストがない) _there's no/we don't have_ : 9 times
  3. 通る (ユニットテストが通る・通らない・通った, etc.) _are passing_ : 8 times
  4. できる _[we] can run_ : 4 times
  5. 必要 _[we] need_ : 3 times
  6. and 24 others with less than 2 hits each, totalling 29

I think we can now feel safe :)

* * *

So why "ユニットテストが通る" is so much less common in google? My speculation is that
we usually want to know if all tests are passing, and if not, which test
exactly is failing. We usually don't care if specific kind of tests are
passing ("Are this kind of tests passing?" isn't something we usually ask).
This means that the _"unit"_ part is actually redundant in many cases. I
suspect that ユニット part hence tends to be just omitted in Japanese, perhaps
because ユニットテスト (yunitto tesuto, key-stroke wise) feels lengthy.




The verb choice, 通る, is perfectly fine. 通過する is another option (sounds more
formal). 合格 is less common but acceptable. ユニットテストが及第点 sounds funny to me
because it's too long and [units tests usually have to be 100%
green](https://ja.wikipedia.org/wiki/%E5%8D%98%E4%BD%93%E3%83%86%E3%82%B9%E3%83%88).

Since テスト in this context is essentially a program, there are several verb
usages that may not be familiar to non-developers. For example テストが走る (runs),
テストが動く (runs), テストが失敗する (fails), テストがこける (fails), テストが転ぶ (fails), テストが死ぬ
(crashes). And テストが通る (passes) is one of them.

The problem is about conjugation. ユニットテストが **通ります** is rarely used because 通る
is a punctual ([instant state-
change](https://japanese.stackexchange.com/q/3122/5010)) verb and the subject
is an inanimate object. What we usually hear are:

  * ユニットテストは通ると思います。 I think unit tests will pass.
  * ユニットテストが通りました。 Unit tests have passed (just now).
  * ユニットテストは通るところです。 Unit tests are about to pass.
  * ユニットテストは通っています。 Unit tests have (already) passed.

Do you really hear ユニットテストが通ります at the office often? It may be said by a
person who has been watching the progress meter of the test runner. If he has
to repeatedly report the completion of the tests to someone else, he might say
ユニットテストが通ります. ("(Everyone,) Unit tests passing (in a few seconds)!").

**EDIT:** To clarify, if you want to say a certain build/test has passed and
thus the status is green (![build
passing](https://i.stack.imgur.com/eGv9t.png)), テスト/ビルドが通っ **ている** is the
right choice, not 通る.

