Add support for passing a PesterConfiguration object to PowerShellBuild
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- PowerShell
- Estrellas
- 145
- Forks
- 27
- Merge medio
- 10 h 16 min
- PR fusionados (30 d)
- 34
Descripción
Currently PowerShellBuild accepts several options to control how Pester is invoked through the $PSBPreference variable. However, there are more Pester options available if you go the "advanced" route and pass in a [PesterConfiguration] object.
You can generate a configuration a few different ways...
$config = New-PesterConfiguration
$config = [PesterConfiguration]::Default
$config = [PesterConfiguration]::new()
We could support all Pester options in an easier way than implementing $PSBPreference settings for each of them individually by allowing users to provide their own Pester configuration like so...
# file: psakeFile.ps1
Properties {
$PSBPreference.Test.Configuration = New-PesterConfiguration -Hashtable @{
# Change defaults as needed. For example...
Run = @{
SkipRemainingOnFailure = 'Run'
}
}
}
There are some considerations though. For example, the advanced option allows providing multiple paths. Should PowerShellBuild be opinionated and aim to maintain the current test behavior by default? If PowerShellBuild overrides properties like Run.Path, should the user be allowed to change that? How so?
Maybe other values from $PSBPreference.Test should be used to override the user-supplied [PesterConfiguration] and if they want to override those defaults, they should do it by updating the corresponding $PSBPreference.Test.* property?
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza por rastrear cómo PowerShellBuild invoca Pester y cómo se aplican las opciones existentes de $PSBPreference.Test. Revisa el valor propuesto de $PSBPreference.Test.Configuration y los ejemplos de PesterConfiguration; después, resuelve la precedencia de las rutas y otras configuraciones. La tarea estará terminada cuando los usuarios puedan proporcionar una configuración y el comportamiento de prueba predeterminado previsto siga siendo claro y esté cubierto.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- powershell
- Área
- testing
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Activo
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100