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

Templates Snapshot Testing Tooling v2 #5705

Open
11 tasks
JanKrivanek opened this issue Nov 30, 2022 · 0 comments
Open
11 tasks

Templates Snapshot Testing Tooling v2 #5705

JanKrivanek opened this issue Nov 30, 2022 · 0 comments
Labels
area: authoring tools Related to authoring tools gathering-feedback The issue requires feedback in order to be planned, please comment if the feature is useful for you triaged The issue was evaluated by the triage team, placed on correct area, next action defined.
Milestone

Comments

@JanKrivanek
Copy link
Member

JanKrivanek commented Nov 30, 2022

Background

This is continuation of #3868
Though we already have some ideas on next iteration, it should be mainly based on feedback from the initial adoption

Ideas for next iteration

  • Support for switching sdk versions
    Simplified approach to achieve this:
    1. switch sdk for new processes
    ren global.json global.json.bak
    dotnet new globaljson --sdk-version <version>
    ren global.json.bak global.json
    
    1. run the instantiation
    2. run Verify while injecting the proper naming suffixes for the sdk (we cannot rely on Verify as it'll run in current process without altered sdk)
    3. cleanup the global.json from step 1
  • Simplify and unify working with paths (include/exclude patterns, paths given in custom scruber and custom verifier etc.) - tooling should be permissive and be able to accept mix-n-matches of dir separator chars, plus it should have settings for enforcing separator char used in path it's passing out (custom scrubber and verifier). Paths passed out should probably be passed as custom type - allowing to fetch relative path (to template root or test root), absolute path, paths with custom spearators
  • Rewrite more snapshots-based integration test for templating instantiation in sdk to use the tooling
  • Add telemetry
  • Implement context detection and extraction for nondeterministic generators handling (so e.g. for Port generator, the logic should be able to detect the resulting value in the generated output and then process the output by replacing all instances of the generator being used).
  • Add Template Validator as another tool in the authoring toolset. Implement just a sample of most importatnt validations (more comprehensive list: Authoring tools: templates & template packages validation #2623)
    • Create MSBuild Task version of the Template Validator
    • Design and use continuable errors during validation - so that as much errors as possible cna be reported during single run (while not reporting nonsense issues caused by inconsistent data detected in previous steps).
  • Build in property based testing
  • Extend API verifier to support custom filter: see Cover TemplateSamples with tests #5794 (comment)
  • Surface addtextextension setting in TemplateVerifierOptions #5785
@vlada-shubina vlada-shubina added the triaged The issue was evaluated by the triage team, placed on correct area, next action defined. label Dec 5, 2022
@vlada-shubina vlada-shubina added this to the Backlog milestone Dec 5, 2022
@vlada-shubina vlada-shubina added the gathering-feedback The issue requires feedback in order to be planned, please comment if the feature is useful for you label Dec 5, 2022
@YuliiaKovalova YuliiaKovalova added the area: authoring tools Related to authoring tools label May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: authoring tools Related to authoring tools gathering-feedback The issue requires feedback in order to be planned, please comment if the feature is useful for you triaged The issue was evaluated by the triage team, placed on correct area, next action defined.
Projects
None yet
Development

No branches or pull requests

3 participants