TDD, new pattern for development ??
Piush Bose
Google DGoC Domain Lead & Instructor @Cloud & @DevOps at TIU | Former Full Stack Developer @The Entrepreneurship Network | Go and Rust Developer
Start of a new era
While the new era of developers starting to come and join the IT world, they already doesn't know the basic concepts of software development (I'm not targeting anyone FYI). As for example if someone asks a new dev who is new to this web dev world that do you know a server side language ? His answer would be no and its pretty obvious.
But as we everyone started to hear about DevOps and how this is so popular among developers now a days is a new way to attract new students who are already struggling to learn web dev or any other development in to this COURSE SELLING youtube marketing.
What's the relation with TDD ????
Yeah there is a relation with TDD aka Test Driven Development. As everyone is starting to lean towards into devops theres is the main concept called CI CD aka Continuous Integration and Continuous Development / Deployment, where we need to enforce software testing and other things such as code formatting code linting which is pretty childish for a solo developer who is new to development world. And it is pretty obvious because he might not get the chance to work with a real team of devs. And on the other hand where this is the main rule of devops to connect the development team with the operations team (no its not that simple its just for the newbies to understand). So he might start thinking about the process how he develops the softwares till that date and how an actual tech company does the same thing.
TDD the showstopper
So here comes the TDD part where the newbies wanna and might learn this. This is a way to develop applications and softwares where we write the test cases before actually coding the software. This enforces us to write clean and bug free code for which our code always pass the tests before shipping to production build. This also takes the pressure from a new DevOps engineer where he might know from where his CI CD pipeline broke or a simple buggy code breaks the whole workflow. This is not the fault of both of them, not the developer who wrote the code nor the devops engineer who pulled the tests into the ci pipelines to be passed.
How I integrated those test into my CI Pipeline
So basically i built a small and simple workflow with github actions inside my current project which is made with nextjs@14
领英推荐
So the ci pipeline is divided into two main workflows and each of them has composite actions inside them. Basically the testing and linting action is the main composite action to enforce the DRY principle because its common in both the production and development environments.
And the testing actions is the same as the production one.
Takeaways
Although there are more good and stable notes about TDD but its not a technical note about that and im not telling anyone that how this will work it is just a blog for a newbie. I think from scaring the test runs and test cases we should enforce the writing tests wo that every SDLC can be streamlined.