Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Testing in DevOps

chandag February 7, 2022

Hello All, 

 

I am quiet new to DevOps and I am little confused about testing (automated) in devops... I mean, while setting up a simple pipeline, I wanted to know what are all the test to be executed and also where exactly in pipeline these tests to be executed.

Consider a simple java based web application as an example....

Please give me some insights.... 

 

Below is a brief summary of pipeline of this project based on my level of understanding of devops... 

 

A code is in github and when a change is committed to the repo, a new build is triggered and I believe during the build, code will be reviewed, compiled and also a unit test will be executed to thus compiled code(pls do correct me if I am wrong here) and then the code will be packaged and deployed to a test environment. Please guide me. 

 

Thanks

Chandan

 

1 answer

1 accepted

2 votes
Answer accepted
Robert Wen_Cprime_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2022

Hello @chandag !

Yes, you're getting the gist.  Once a commit happens, unit testing should happen automatically.  Other checks such as listing could occur at this stage.  If the tests pass, the commit is allowed.

You can also automate the merge of changes back to a higher-level branch (including master/main).  More tests including some BDD-style tests can be run.  Once merged, automation can create the deploy packages and deploy to staging or even to production.

Use of this CI/CD pipeline is one of the fundamental practices of DevOps. 

Hope this helps.

chandag February 8, 2022

Hello @Robert Wen_Cprime_ ,

Really appreciate your reply. Just got a quick follow up question.

Could you please let me know if all the tests be conducted only after a build has been deployed to a test server or are there any tests that can be or should be done directly to a build (.jar/.war file) before it has been deployed to a Test server.

Robert Wen_Cprime_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2022

It depends on the type of test.

SAST (Static Analysis) scan the source code to find errors and security vulnerabilities.

Dependency scans are done either before or after a build.  They scan libraries to see if security vulnerabilities exist.

Dynamic Scan (DAST) are run against a build on a test server.  BDD tests are also run against a build on a test server/production server

Like Steffen Opel _Utoolity_ likes this
chandag February 8, 2022

Thanks @Robert Wen_Cprime_ 

Actually what I thought is when a test is conducted just on a build (.jar/.war package), it is not possible to conduct any functionality test. Am I right here?

So, If I am right, then BDD testing doesn't test any functionality? (assuming we are talking about a web application).

Also Does Integration Testing happens against build? or Does it happens against application? Same question for Regression Testing...

Also should the tests on a Build should happen only in Test server/Prod server or can the test be done on a build in Jenkins Server itself?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events