Skip to content

Add testo.Plugins function to obtain installed plugins - #33

Draft
metafates wants to merge 1 commit into
mainfrom
inspect-plugins
Draft

metafates wants to merge 1 commit into
mainfrom
inspect-plugins

Conversation

@metafates

Copy link
Copy Markdown
Member

This PR adds a new testo.Plugins function:

// Plugins returns information about installed plugins
// in the given t instance.
//
// Returned slice follows plugins declaration order.
//
// For example:
//
//	type T struct{
//		*testo.T
//		*PluginBar
//		*PluginFoo
//		*PluginAllure
//	}
//
//	func (*Suite) Test(t T) {
//		testo.Plugins(t)
//	}
//
// Would return:
//
//	[]testoplugin.Plugin{*PluginBar(...), *PluginFoo(...), *PluginAllure(...)}
//
// NOTE: this function returns pointers to an actual plugin instances, so calling
// their methods is equivalent to calling T's methods.
func Plugins(t CommonT) []testoplugin.Plugin

Closes #32

@metafates metafates self-assigned this Oct 4, 2026
@metafates metafates added the enhancement New feature or request label Oct 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose plugins to other plugins

1 participant