Closed theyiwenliu closed 4 years ago
Our frontend testing story is something we've been actively working to improve, using rules_webtesting, for quite some time. We're in some respects constrained by our Travis testing environment, which we might replace. We'd welcome contributions that help us improve.
@jart Thanks for your reply, may I know how do you trigger the frontend tests with rules_webtesting? Like what is the exact command you are using?
Try running bazel test //tensorboard/functionaltests:core_test
. That should download Chromium and browser test from the command line, but it's always been flaky. So we sometimes do things like bazel run //tensorboard/components/vz_sorting/test
and open the test html file in the browser, and then open the Chrome console to see if it passed.
I am trying to run tests for graph plugin but there is no BUILD
file under tensorboard/plugins/graph/tf_graph_common/test
, how do I to trigger these tests? Thanks in advance!
FTFY #1193
It's now merged. Test away my friend.
It works! Thanks for your efficiency! 👍
bazel test //tensorboard/...
should cover the front end tests as well. To exclude the python tests, run bazel query 'tests(//tensorboard/my/package/...)'
to find the right tests plus bazel test TEST_TARGET
once you've located it.
What @bileschi says is correct. Additionally, all our web test targets
have the webtest
tag, so you can find them with a bazel query
:
$ bazel query 'attr(tags, webtest, tests(//tensorboard/...))'
//tensorboard/webapp:karma_test_chromium-local
//tensorboard/plugins/projector/vz_projector/test:test_chromium
//tensorboard/plugins/hparams/tf_hparams_utils:test_chromium
//tensorboard/plugins/hparams/tf_hparams_scale_and_color_controls:test_chromium
//tensorboard/plugins/hparams/tf_hparams_query_pane:test_chromium
//tensorboard/plugins/hparams/tf_hparams_parallel_coords_plot:test_chromium
//tensorboard/plugins/hparams/tf_hparams_google_analytics_tracker:test_chromium
//tensorboard/plugins/histogram/tf_histogram_dashboard/test:test_chromium
//tensorboard/plugins/graph/tf_graph_common/test:test_chromium
//tensorboard/functionaltests:core_test_chromium
//tensorboard/components/vz_sorting/test:test_chromium
//tensorboard/components/vz_line_chart2/test:test_chromium
//tensorboard/components/tf_tensorboard/test:test_chromium
//tensorboard/components/tf_storage/test:test_chromium
//tensorboard/components/tf_paginated_view/test:test_chromium
//tensorboard/components/tf_color_scale/test:test_chromium
//tensorboard/components/tf_categorization_utils/test:test_chromium
//tensorboard/components/tf_backend/test:test_chromium
//tensorboard/components/experimental/plugin_util/test:test_chromium
//tensorboard/components/experimental/plugin_lib/test:test_chromium
We have
bazel test tensorboard/...
for python tests, but currently there is no document forhow to execute frontend unit tests
.e.g. how to execute tests under
tensorboard/plugins/graph/tf_graph_common/test
ortensorboard/plugins/audio/tf_audio_dashboard/test
etc.And I thought the
BUILD
file undertensorboard/plugins/audio/tf_audio_dashboard/test
will tell Bazel to trigger the test, but from the output I didn't see this test was executed withbazel test tensorboard/...
.Any comment or suggestion is appreciated.