Guide on How To write an Arquillian Extension


#1

Hi there,

I am currently trying to write an Arquillian Extension (see another support topic for further information).
One big problem is the lack of guides and documentation.
Could you provide some sort of guide on how to write an extension in general?

I was thinking :thinking: of something along the lines of:
- what do I need for an extension?
- how do I change the way Arquillian invokes my method?
- how do I stop and start the test? (to maybe do something in between)
- how do I modify test results?
- how do I include my extension in my project?
- …etc.

Maybe it would also be helpful to provide a more thorough and detailed SPI documentation.

Thanks in advance :hugs: ,
Nicole


#2

since i wrote the topic i have found this:

this is a good start, but it is not complete yet


#3

this is a good start, but it is not complete yet

What’s missing and you need help with? Happy to shed some light.


#4

Thx for the reply :slight_smile: :+1:
Well, it is missing the main part actually.
If you look at the unfinished tutorial in github, you might see what i mean.

There is no tutorial on what a LoadableExtension needs. My main questions are concerning the writing of an extension that changes the way a testmethod is executed:

  • what SPIs do i need for that? as i understand it so far: i will need to use the SPIs and can not simply write a new runner, because other extensions might have a problem with that. But it is unclear what SPIs are actually needed.
  • what structure does my extension need to have? i have found some descriptions on how arquillian runs, but it is not yet clear to me what arquillian “expects”
  • if i start my execution let´s say by observing the test-event: where do i get the executed test-method and the instance of the test-class from? what does arquillian need as a result? and how do i give arquillian a result back? or maybe arquillian might not even need a result… ?

Maybe you could help to bring some light into this?

Thanks in advance :hugs: