package icon indicating copy to clipboard operation
package copied to clipboard

Running tests for the metaparticle

Open srini85 opened this issue 8 years ago • 3 comments

Thought of opening a new thread rather than expanding on #49

Assuming that the metaparticle is to have a set of tests associated with it, how should they be included? Should they be a seperate project that resides in a particular folder that gets run as part of the build command? Or should they be included along side the code?

Would be interesting to hear your thoughts @brendanburns and others

srini85 avatar Jan 22 '18 03:01 srini85

Good question...

I assume that the desired flow would be:

  • Build
  • Test
  • Deploy

??

And if 'Test' fails, then 'Deploy' would not happen...

The easiest thing (of course) would be to simply shell out to a script, but that also kind of feels like cheating at some level...

Perhaps the executor or builder could have a Test() function, but in that case, there is a lot of per-language implementation and assumptions.

If you were to add this what would you think it should look like?

I'm definitely open to proposals here.

brendandburns avatar Jan 22 '18 06:01 brendandburns

@brendanburns - yeah I think there has to be some sort of interface that defines that a test runner to run prior to the Deploy in the sequence you mentioned.

You are right about per-language implementations so perhaps there needs to be a defined contract when developing metaparticle package for a particular language?

I have had an initial stab at how it could be done in dotnet https://github.com/srini85/package/pull/1

Still needs some work in terms of restructuring code, but hopefully you can see if from a high level and provide your thoughts?

srini85 avatar Jan 22 '18 09:01 srini85

@brendandburns should this ticket still be open? We made a merge for adding tests. Something else we still want to discuss?

srini85 avatar Jun 29 '18 21:06 srini85