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

Simplify usage of integration tests from nuget package #11403

Merged
merged 2 commits into from
Oct 20, 2021

Conversation

bergmania
Copy link
Member

This makes it simpler to use the integration test framework using nuget.

Now it is not required to add your own assembly to the list of assemblies to scan.

Test

  • Tests should pass
  • Use the nuget package (Umbraco.CMS.Tests.Integration) and setup a integration tests
    [TestFixture]
    [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)]
    public class TranslationsBuilderServiceTests : UmbracoIntegrationTest
    {
        [OneTimeSetUp]
        public void OneTimeSetUp()
        {
           // This is not required anymore with the new fix
           // TestOptionAttributeBase.ScanAssemblies.Add(this.GetType().Assembly);
        }

        [Test]
        public void Test()
        {
            // What ever
        }
    }

@bergmania bergmania marked this pull request as ready for review October 19, 2021 09:20
@Zeegaan
Copy link
Member

Zeegaan commented Oct 20, 2021

Tested this and it also works by making a test class in the web project (not recommended of course) 👍

LGTM 💪

@Zeegaan Zeegaan merged commit 9494591 into v9/dev Oct 20, 2021
@Zeegaan Zeegaan deleted the v9/feature/improve_package_usage_of_integration_tests branch October 20, 2021 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants