dotnet / dotnet/aspnetcore

Refactor project template tests to make them more consistent and reduce repetition

Open
#42,188 4 comments 0 reactions 0 assignees View on GitHub
area-infrastructure area-mvc feature-templates task
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

From PR comment: https://github.com/dotnet/aspnetcore/pull/42143#issuecomment-1154757891

> @HaoK: Not strongly suggesting you do this, but seeing all the instances of SkipOnHelix, and all the logic around computing launch settings. I started wondering if the https tests were split into derived (class i.e. MvcHttpsTemplateTest), it might reduce some of the duplication, as you could have a property controlling whether all the tests were doing Https or not rather than having 2 permutations of every test, and could move the SkipOnHelix to the https class as well. Food for thought anyways

> @DamianEdwards: Yeah this is kind of the problem with these tests is they grow so organically over time and it's easiest to just copy/paste/add-dimension, not to mention that often when there's a Helix issue the tests get tactically refactored to allow disabling only the affected tests on Helix. They could certainly be refactored in places but honestly there's a time/effort-element here as well.

> @HaoK: Yeah I think maybe we should just have a chore/tracking issue to refactor the tests, definitely shouldn't do it in this PR, but I think these are getting near that unwieldy point where a refactor pass might make sense soon, especially if any more permutations are added

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.