VulnerableApp-facade icon indicating copy to clipboard operation
VulnerableApp-facade copied to clipboard

Increase test coverage for Components which are missing few methods

Open preetkaran20 opened this issue 3 years ago • 6 comments

As part of https://github.com/SasanLabs/VulnerableApp-facade/issues/56 we have introduced a unit testing framework and now we are looking for adding more unit test for the project.

we are missing few unit tests for https://github.com/SasanLabs/VulnerableApp-facade/tree/main/facade-app/src/Components package.

Have a look at codecov report for finding what all is missing and cover that as part of this issue. Codecov report: https://app.codecov.io/gh/SasanLabs/VulnerableApp-facade/tree/main/facade-app/src/Components

preetkaran20 avatar Oct 01 '22 13:10 preetkaran20

Could you guide me related to this contribution? As I am new to open source.

ayushsinha25 avatar Oct 01 '22 13:10 ayushsinha25

Hi @ayushsinha25 ,

So we have introduced a unit test framework as part of #56 and there are many unit tests written in the project link. These tests cover many classes but some of the methods are not getting covered as described at https://app.codecov.io/gh/SasanLabs/VulnerableApp-facade/tree/main/facade-app/src/Components.

Now what we need to do is find out what all conditions as not getting covered and cover those via writing the unit test which is adding methods to the already written tests.

example: https://github.com/SasanLabs/VulnerableApp-facade/blob/main/facade-app/src/test/Header.test.tsx class covers the https://github.com/SasanLabs/VulnerableApp-facade/blob/main/facade-app/src/Components/Header.tsx file but if we look at the report of codecov we find that few conditions are not covered as shown below

image

so we need to cover them.

thanks, Karan

preetkaran20 avatar Oct 01 '22 13:10 preetkaran20

Hey, can I work on this PR?

trishitchar avatar Oct 01 '22 13:10 trishitchar

@trishitchar @ayushsinha25 There are multiple classes, you guys can pick one of them and work on it. I have assigned to you.

please remove assignment, if not interested.

preetkaran20 avatar Oct 01 '22 13:10 preetkaran20

Can you please elaborate. I'm also a newbie in open source.

trishitchar avatar Oct 01 '22 14:10 trishitchar

please have a look at https://github.com/SasanLabs/VulnerableApp-facade/issues/90#issuecomment-1264368356 and let me know if you have any questions.

preetkaran20 avatar Oct 01 '22 14:10 preetkaran20