Tom Lima
Tom Lima

Reputation: 1056

How to perform the implementation of tests?

I currently have an application with my backend in PHP (Codeigniter) and Frontend in Vuejs. I know that the test culture is super important to ensure the quality of a software, but I have a lot of doubts on how to start:

Where do I start? Do I write the tests for the backend or frontend first?

Before deploying the application, should I run all tests? Backend and frontend?

I know that there are test frameworks for PHP (PHPUnit) and for Vue as well (Jest) I wonder if there is any way to test the styling part, too, of CSS. Because sometimes i often create a class in my style sheet that breaks some other element of the application.

Upvotes: 0

Views: 34

Answers (1)

Imre Ujlaki
Imre Ujlaki

Reputation: 335

It depends on you, in a perfect world you should test BE and FE too.

It's tricky because testing a BE is essential, because all of your business logic there and it can cause security problems.

FE testing maybe a bit more important for your users / customers because they only see that result but if you have a shinny FE but your BE have a lot of issues your customers will be frustrated.

I think if you don't have enough resources or a testing team you can testing your BE via API, because that's how your Vue FE will be communicate with your PHP and it's easier to coverage your functionality than write unit test all of your PHP code.

Anyway you mentioned that sometimes i often create a class in my style sheet that breaks some other element of the application. if you use scoped style in your components it won't be problem anymore:

https://vue-loader.vuejs.org/guide/scoped-css.html

Upvotes: 1

Related Questions