Scaffolder: Have a way to do integration tests for fetch:template
See original GitHub issueThe fetch:template action in the scaffolder doesn’t support an out-of-action integration test path. With the cookiecutter templates, one could just run the CLI.
Feature Suggestion
Offer the templating logic as an export of the scaffolder module, or even as CLI.
Context
Authors of templates would like to run intergration tests, or also use their templates outside of the backstage creation pipeline.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:17
- Comments:19 (14 by maintainers)
Top Results From Across the Web
Writing scaffolder templates - Roadie.io
The Roadie Backstage scaffolder is a feature that allows you to define software templates to create new software projects, update existing ones ...
Read more >Writing Templates · Backstage Software Catalog and ...
You can create your own templates with a small yaml definition which describes the template and its metadata, along with some input variables...
Read more >Efficient, reusable application templates and scaffolding
Do you want to start a new project and need to re-write the code again? ... ESLint integration, unit testing, and end-to-end testing....
Read more >Building and Testing a REST API in Go with Gorilla Mux and ...
In order to run the tests, we need to implement the Initialize method of App in app.go , to establish a connection with...
Read more >Using custom appsettings.json with ASP.NET Core integration ...
Integration tests need web application run with all bells and whistles to make sure that all components work together with no flaws. Often...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@cnmcavoy As the project grows, the central packages start gathering large amounts of dependencies and cruft, as they try to implement support for an ever growing set of systems and frameworks. This increases the security threat surface, makes maintenance more complex, and bloats deployments. Therefore, we have intentionally broken apart some of these into smaller modules that you can pick and choose among depending on what your particular needs and desires are. The cookiecutter was one of those dependencies that we no longer wanted to have directly in the central package itself, but it’s perfectly available for use if you want it. One more of the reasons it was broken out was its security implications, in terms of its ability to run arbitrary hook code. Cookiecutter as such is perfectly fine, albeit a bit unwieldy since it’s extremely not-native to node 😃 Thus some need to run it in a docker container because of its large footprint and intrinsic dependencies.
Hi all, (full disclosure only skimmed through this issue/still reading through it)
We are also interested in this.
For context, we have other teams owning almost all of our templates and when they are testing their templates they just want to see the template step output resembles what they expect it to. Previously we told engineers to use cookiecutter locally for this and even had scripts to help automate this
We aren’t necessarily trying to recreate the whole scaffolder, we still find testing it in Backstage end to end locally handles this fine. The main issue for us is with the move away from cookiecutter to templating in JS with nunjunks, we’d like a similar CLI/method to test our template with some dummy values gives us the expected output
Although testing all the actions via a CLI could be nice, I think a good first step would just be testing the nunjunks template step via a CLI