Unit testing frontend when using component library #1773
Unanswered
Albiniivari
asked this question in
Q&A
Replies: 1 comment
-
|
That really depends on your architecture. If your Blazor Page is absent of any logic and only consists out of (3rd party) components that represent some state without business rules - probably there is no big need for unit testing (and therefore bUnit). We offer utilities to work with 3rd party components (like shallow rendering, stubs, fakes, and so on). If your component retrieves the movies inside its lifecycle and does some validation or other kind of logic - then bUnit might be a very good candidate for that. The same applies to form submit example. And yes:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We will use BUnit to do unit tests in the frontend. We use Radzen as a component library. So what exactly is it that you would unit test? I assume you dont test the component library as that is already tested by them.
Do you test the page you're building or is that an integration test?
E.g say we are building a page that perhaps has a table to show existing movies. A create form to upload new movies. Clicking the movie would open a dialog that shows details etc etc.
Would you still use bunit to test these parts? E.g test that the table is showing stuff (but its a radzen table..), test that the form submits correct data to the service?
Beta Was this translation helpful? Give feedback.
All reactions