SasanLabs / VulnerableApp-facade

VulnerableApp-facade is probably most modern lightweight distributed farm of Vulnerable Applications built for handling wide range of vulnerabilities across tech stacks.
Apache License 2.0
45 stars 48 forks source link

Increase test coverage for Components which are missing few methods #90

Open preetkaran20 opened 1 year ago

preetkaran20 commented 1 year ago

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

ayushsinha25 commented 1 year ago

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

preetkaran20 commented 1 year ago

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

trishitchar commented 1 year ago

Hey, can I work on this PR?

preetkaran20 commented 1 year ago

@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.

trishitchar commented 1 year ago

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

preetkaran20 commented 1 year ago

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