test_analyzer: Add initial setups & bigquery connections.

BUG=chromium:818020
TEST=Ran 'pipenv run pytest test_analyzer/integration_test'.
Ran 'bin/run_tests'.

Change-Id: I7665a5db69be4ac6a930ce0eb5648be8ff0f6a39
Reviewed-on: https://chromium-review.googlesource.com/944621
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Paul Hobbs <phobbs@google.com>
Commit-Queue: Xixuan Wu <xixuan@chromium.org>
13 files changed
tree: e8f5dbd2907b6815c54a8ecc92b88c5a5e8b54aa
  1. bin/
  2. test_analyzer/
  3. .gitignore
  4. Pipfile
  5. Pipfile.lock
  6. PRESUBMIT.cfg
  7. pytest.ini
  8. README.md
README.md

Setup

  1. Download service account service secret files:

     gsutil cp -r gs://chromiumos-test-analyzer.appspot.com/credentials
     ./test_analyzer/
    

    It includes 2 json files, one for prod & one for staging instance.

  2. Install pipenv to create virtual environment for local tests:

     sudo pip install pipenv
    
  3. Try to run tests:

    For unittest:

     bin/run_tests
    

    For integration test:

     pipenv run pytest test_analyzer/integration_test/