Run Only Newly Added Branch Tests Before Deploy

Hi there,

We have Require data tests to pass before deploying this project to production set as true because we would like contributors to run test files before merging to production. However,  once a project gets very large it can become extremely time consuming to run ALL tests for every contribution. We want to set a schedule to run all the project tests at least once a day to catch any fails, but we were hoping there was a way to effectively change the Run Test button to the Run LookML Test (make 1 in image behave as 3 in image)? This would force contributors to run tests on the work they are about to merge to production and remove the excessive wait time of running ALL tests every time.
We understand the risks of merging to production without ensuring that all tests have passed but currently the time wasted waiting for test completion outweighs the risk of potential errors and we certainly do not want to remove test enforcement completely.
Any thoughts will be much appreciated.

JanJerlingTakea_1-1670225226012.png

 

Solved Solved
0 2 157
1 ACCEPTED SOLUTION

Roderick
Community Manager
Community Manager

HI @JanJerlingTakea,

I have a couple of thoughts on how to effectively change the Run Test button to the Run LookML Test:

  1. Create a separate file for data tests. This will allow you to run only the tests that are relevant to the changes that have been made.
  2. Use a continuous integration (CI) server to run the tests automatically. This will free up your developers to focus on other tasks, and it will also help to identify any problems early on.
  3. Use a test-driven development (TDD) approach to development. This will force you to write tests for each new feature or change that you make. This will help to ensure that your code is well-tested and that it works as expected.
  4. Use a linter to check for potential errors in your LookML code. This will help to identify any problems early on, before they cause problems in your production environment.

These are just a few ideas on how to effectively change the Run Test button to the Run LookML Test. By following these tips, you can help to ensure that your LookML code is well-tested and that it works as expected.

 
 
 

View solution in original post

2 REPLIES 2

Roderick
Community Manager
Community Manager

HI @JanJerlingTakea,

I have a couple of thoughts on how to effectively change the Run Test button to the Run LookML Test:

  1. Create a separate file for data tests. This will allow you to run only the tests that are relevant to the changes that have been made.
  2. Use a continuous integration (CI) server to run the tests automatically. This will free up your developers to focus on other tasks, and it will also help to identify any problems early on.
  3. Use a test-driven development (TDD) approach to development. This will force you to write tests for each new feature or change that you make. This will help to ensure that your code is well-tested and that it works as expected.
  4. Use a linter to check for potential errors in your LookML code. This will help to identify any problems early on, before they cause problems in your production environment.

These are just a few ideas on how to effectively change the Run Test button to the Run LookML Test. By following these tips, you can help to ensure that your LookML code is well-tested and that it works as expected.

 
 
 

We employed CICD as you suggested and it is a great time saver.

Thanks for the response!