Run unit tests #220

Closed
NTCoding opened this Issue Nov 18, 2012 · 10 comments

Comments

Projects
None yet
5 participants
@NTCoding

Please run unit tests and allow me to configure the system to not deploy when any unit tests fail.

TFS publishing does this, app harbour does this.

@amitapl

This comment has been minimized.

Show comment Hide comment
@amitapl

amitapl Nov 18, 2012

Contributor

The immediate way to do this is using Deployment hooks.

Currently we are working on a simpler way to customize deployments with samples of adding unit test run, this should be here soon.

Contributor

amitapl commented Nov 18, 2012

The immediate way to do this is using Deployment hooks.

Currently we are working on a simpler way to customize deployments with samples of adding unit test run, this should be here soon.

@ghost ghost assigned amitapl Nov 26, 2012

@davidebbo

This comment has been minimized.

Show comment Hide comment
@davidebbo

davidebbo Jan 4, 2013

Member

Some of this can be done today using custom scripts. Hopefully, at some point we can do this completely automatically. Moving to S21.

Member

davidebbo commented Jan 4, 2013

Some of this can be done today using custom scripts. Hopefully, at some point we can do this completely automatically. Moving to S21.

@neraath

This comment has been minimized.

Show comment Hide comment
@neraath

neraath May 10, 2013

I've followed Maarten's blog post on running unit tests using deployment hooks, but I'm now running into an error during deployment:

"The system cannot execute the specified program."

I've verified that Gallio is being properly downloaded and unzipped and that the command is available for execution by testing locally. I've tested this using not only Gallio, but also using the NUnit runner from the NUnit.Runners package in NuGet. Does anyone know whether support for running third party executables during the deployment hooks stages has ceased?

neraath commented May 10, 2013

I've followed Maarten's blog post on running unit tests using deployment hooks, but I'm now running into an error during deployment:

"The system cannot execute the specified program."

I've verified that Gallio is being properly downloaded and unzipped and that the command is available for execution by testing locally. I've tested this using not only Gallio, but also using the NUnit runner from the NUnit.Runners package in NuGet. Does anyone know whether support for running third party executables during the deployment hooks stages has ceased?

@davidebbo

This comment has been minimized.

Show comment Hide comment
@davidebbo

davidebbo May 10, 2013

Member

@neraath could you share the test repo that you're using (e.g. on github) so we can try exactly what you're trying? Thanks!

Member

davidebbo commented May 10, 2013

@neraath could you share the test repo that you're using (e.g. on github) so we can try exactly what you're trying? Thanks!

@neraath

This comment has been minimized.

Show comment Hide comment
@neraath

neraath May 10, 2013

@davidebbo , yep. I just pushed up the repo. This was previously local git push deployments to Azure rather than github-based deployments.

d93d3c115a was the final working commit for the NUnit runners. I could not get it to work properly (same error as referenced above), but presumed one of the reasons could have been that the nunit-console.exe is not a strongly signed assembly. That's why I tried to use Gallio.

HEAD is the latest attempt with Gallio, but still the same behavior. Let me know if you see anything glaring that I'm missing.

neraath commented May 10, 2013

@davidebbo , yep. I just pushed up the repo. This was previously local git push deployments to Azure rather than github-based deployments.

d93d3c115a was the final working commit for the NUnit runners. I could not get it to work properly (same error as referenced above), but presumed one of the reasons could have been that the nunit-console.exe is not a strongly signed assembly. That's why I tried to use Gallio.

HEAD is the latest attempt with Gallio, but still the same behavior. Let me know if you see anything glaring that I'm missing.

@davidebbo

This comment has been minimized.

Show comment Hide comment
@davidebbo

davidebbo May 10, 2013

Member

Looks like it is indeed broken. So trying to understand if there was a regression: are you sure that the exact same worked before? Or maybe when it worked it was a slightly different version on the tools?

Either way, we need to make it work.

Member

davidebbo commented May 10, 2013

Looks like it is indeed broken. So trying to understand if there was a regression: are you sure that the exact same worked before? Or maybe when it worked it was a slightly different version on the tools?

Either way, we need to make it work.

@pranavkm

This comment has been minimized.

Show comment Hide comment
@pranavkm

pranavkm May 10, 2013

Contributor

Curiously, all the x86 versions of the executable from the bin directory of the package seem to be working fine.
For instance, using KuduExec

C:\DWASFiles\Sites\convene\AppData\Gallio\bin> Gallio.Host.exe /help
The system cannot execute the specified program.

C:\DWASFiles\Sites\convene\AppData\Gallio\bin> Gallio.Host.x86.exe /help
Available options:

/ipc-port:
....

Contributor

pranavkm commented May 10, 2013

Curiously, all the x86 versions of the executable from the bin directory of the package seem to be working fine.
For instance, using KuduExec

C:\DWASFiles\Sites\convene\AppData\Gallio\bin> Gallio.Host.exe /help
The system cannot execute the specified program.

C:\DWASFiles\Sites\convene\AppData\Gallio\bin> Gallio.Host.x86.exe /help
Available options:

/ipc-port:
....

@neraath

This comment has been minimized.

Show comment Hide comment
@neraath

neraath May 10, 2013

Hey @davidebbo, I have not made this work previously, but apparently Maarten has.

@pranavkm - You're absolutely right, but there's not an x86 version of the Gallio.Echo executable. However, there is an x86 version of the NUnit console runner, which worked beautifully!

neraath commented May 10, 2013

Hey @davidebbo, I have not made this work previously, but apparently Maarten has.

@pranavkm - You're absolutely right, but there's not an x86 version of the Gallio.Echo executable. However, there is an x86 version of the NUnit console runner, which worked beautifully!

@davidebbo

This comment has been minimized.

Show comment Hide comment
@davidebbo

davidebbo May 10, 2013

Member

That's interesting. At least it gives a workaround!

Member

davidebbo commented May 10, 2013

That's interesting. At least it gives a workaround!

@davidebbo

This comment has been minimized.

Show comment Hide comment
@davidebbo

davidebbo May 29, 2013

Member

The scenario now works quite well, as shown in this blog post. While it still requires a custom script, that's a small hurdle for those who want to run tests before deployment. Please let us know if you run into issues.

Member

davidebbo commented May 29, 2013

The scenario now works quite well, as shown in this blog post. While it still requires a custom script, that's a small hurdle for those who want to run tests before deployment. Please let us know if you run into issues.

@davidebbo davidebbo closed this May 29, 2013

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