anchor.diff:      $ bundle
       ```
   
  -3. Add the Test analytics code to your application in `spec/spec_helper.rb`, and set the envionment variable [securely](/docs/pipelines/secrets) on your agent or agents.
  +3. Add the Test Analytics code to your application in `spec/spec_helper.rb`, and set the envionment variable [securely](/docs/pipelines/secrets) on your agent or agents.
   
       ```rb
       require "rspec/buildkite/analytics"
  
positive.code:     $ git push
      ```
  
  5. Make sure that the Test Analytics [environment variables](#integrating-with-rspec-environment-variables) are set so that the RSpec integration can use them in your Test Analyitics dashboard.
  
  Once you’re done, in your Test analytics dashboard, you'll see analytics of test executions on all branches that include this code.
  
  ### Environment variables
  
  
negative.code: }
  ```
  
  ## Importing JSON
  
  The Test Analytics JSON API accepts all of the same information that test framework integrations do, allowing you to display, analyze, and explore more detailed information than the more limited data included in generic JUnit XML reports.
  
  To import JSON formatted test result data, make a POST request to `https://analytics-api.buildkite.com/v1/uploads`, with metadata and JSON in the request body:
  
  * if you're making the request in a Buildkite pipeline, you can use the Buildkite [environment variables](/docs/pipelines/environment-variables#bk-env-vars) to set the metadata
  * if you're making it elsewhere, you'll need to set them yourself.
  
  Test Analytics uses the following  variables in the `run_env` attribute to populate test information. The only required  variable is `key`, but some features of Test Analytics aren't available if not all of the other  variables in the following example are set:
  
  * `CI`
  * `key` (**required**)
  