Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrchardCore Testing #11865

Open
MichaelPetrinolis opened this issue Jun 14, 2022 · 5 comments · May be fixed by #13018
Open

OrchardCore Testing #11865

MichaelPetrinolis opened this issue Jun 14, 2022 · 5 comments · May be fixed by #13018
Milestone

Comments

@MichaelPetrinolis
Copy link
Contributor

Is your feature request related to a problem? Please describe.

When developing an Orchard Core module/app it would be nice to have a Testing Library to get you started with unit and integration testing in OrchardCore terms

Describe the solution you'd like

Create an OrchardCore.Testing library by extracting reusable code from OrchardCore.Tests

@rjpowers10
Copy link
Contributor

I haven't used it myself but you may be interested in https://github.com/Lombiq/UI-Testing-Toolbox

@MichaelPetrinolis
Copy link
Contributor Author

Thanx @rjpowers10 , my point here is to reuse the objects in OrchardCore.Tests and provide a Testing library specific for OrchardCore, so devs can use the same logic - as in OrchardCore source - to test their own modules.

@hishamco
Copy link
Member

@MichaelPetrinolis believe it or no I was planned to working on something similar because I'm interesting in Software Testing, It's great to see your input

I need to look into your PR soon, If you need help on this I can handle it or at least contribute as much as I can

@MichaelPetrinolis
Copy link
Contributor Author

MichaelPetrinolis commented Jun 14, 2022

@hishamco thanx! Looking forward for your feedback/suggestions.

@hishamco
Copy link
Member

Hi @MichaelPetrinolis I'm thinking to organize the testing projects as the following:

  • OrchardCore.Tests.Common
  • OrchardCore.Tests / OrchardCore.UnitTests
  • OrchardCore.Tests.Functional
  • OrchardCore.Tests.Integration
  • OrchardCore.Tests.UI / OrchardCore.Tests.AcceptanceTest
  • OrchardCore.Tests.Benchmark

BTW we already have a unit tests and some functional tests, I need to dig into Cypress to check if these tests are functional or user acceptance tests or UI

For UI tests we already have a test suite from Lombiq that can fit nicely here

Our current tests need to be organized in terms of namespaces and group them accoding to the source:

  • APIs tests
  • Modules tests

I can work hard in this are if the team agree, the PR that @MichaelPetrinolis is created is a very good start to refactor and move the common thing into a place, so they can be reusable

Also we need a set of built-in testing APIs infrastructure, that simplify testsing APIs & modules, instead of repeating the code or do everything from scratch

@sebastienros sebastienros added this to the 1.x milestone Jun 16, 2022
@hishamco hishamco linked a pull request Dec 31, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants