From fd27d23528a395e1d46cb66bdae810050f308c46 Mon Sep 17 00:00:00 2001 From: Xiaozhen Liu Date: Fri, 2 Oct 2020 21:49:00 +0000 Subject: [PATCH] update readme --- DEVELOPMENT.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 026cfbdfcd..4320c37a42 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -85,3 +85,23 @@ below are temporary and better ones will be coming. ```sh bazel run :google_java_format ``` + +## Test Running + +- Run all unit tests. + + ```sh + bazel test //... + ``` + +- Run a single unit test like `JavaCodeGeneratorTest.java` + + ```sh + bazel run //src/test/java/com/google/api/generator/engine:JavaCodeGeneratorTest + ``` + +- Update goldens files based on code generation in unit test, for example `JavaCodeGeneratorTest.java` + + ```sh + bazel run //src/test/java/com/google/api/generator/engine:JavaCodeGeneratorTest_update + ```