Skip to content

09 ‐ Quality

Gustavo Jaques edited this page Dec 3, 2024 · 1 revision

Gherkin syntax for all tests purposes - unit, integration and e2e.

bdd-example

Everything must be written be using BDD concepts (ubiquitous language).

Feature prefix

SMTC- Social Makers Test Cases

.NET files should follow:

/SUT/{section-name}.cs inside a project with {domain}.Integration or {domain}.Unit

ex1

Angular files should follow:

{component-name}.SMTC{NUMBER}.spec.ts inside same folder of what we're testing.

ex0

{component-name}.SMTC{NUMBER}.cy.ts inside same folder of what we're testing (integration or e2e purposes).

cy-files

Karma + Jasmine

Consider for unit and integration tests.

jasmine-karma

Cypress

Consider only for end to end with integration concepts - must have local angular project running on port 4200.

cypress-example

xUnit

Main project and library used for unit and integration tests.

Moq

Consider for stub, fake, mock, spy....even this library distorce the meaning of it all.

Examples

Unit test

service-unit

Integration test

controller-integration

Headless

Everything should be executed on its project folder

Jasmine + Karma

ng test --browsers ChromeHeadless

jasmine-karma-2

Cypress

npx cypress run --headless

cypress

xUnit

dotnet test

xunit-ut

xunit-it

VSCode Conflit (tests)

Due to conflit of couple libraries, perform an action to use Visual Studio Code.

vscode-test-settings

It's necessary to write test codes (unit, integration and end).