How can I automatically upload a release into Codeplex? - msbuild

I'm imagining something like
msbuild /t:CodeplexRelease
which would build, then upload the outputs to the specified Codeplex project.
Has anyone done this?

Here's documentation on using the "CodePlex MSBuild Tasks" for creating and uploading files for a new release: http://codeplex.codeplex.com/wikipage?title=CodePlexMSBuildTasks&referringTitle=CodePlexAPI

Setting up a continuous integration server for a CodePlex project
SNAK - The Simple NAnt Acceleration Kit
Getting Continuous Integration Working With CodePlex: Part III
that should get you started.

You might be able to write a task that uses WatiN or Selenium, but as far as I know CodePlex doesn't have an API for such automated tasks.

Related

How to get Selenium tests to run after deployment in visual studio team services

I am having an issue getting selenium end to end tests to work after an automated deployment using visual studio team services (VSTS).
I have a build working that generates a build artefact. This is triggered from VSTS but runs on an on premises build server. I have a deployment working that deploys to an on premises development web server. All this works including unit tests running after the build.
When I try to add testing after the deployment is when I run into the problem. The tests are to be run on the build server and point to the dev server website. The deployment has two phases. A deploy and then an agent phase that runs a test assemblies task using the build agent on the build server. The problem seems to be that the test dll's are not being included in the build artifact and so are never found when the test process runs. Deploy setup us as follows.
I have a copy files before the publish artifact in the build definition that seems to copy the files in to the right place but they are not included in the zip file artefact. I've looked at several websites and posts on here but I still seem to be missing a vital bit of knowledge that will get this working.
Use of the log did help as recommended so thanks for that.
I have managed to get this working. I separated the selenium tests out into a separate solution and built that separately creating it's own build artefact. I then added this to the agent task in the deploy. This worked. The only thing I need to get sorted now is the correct search path to find the test DLL's. It's not quite as dynamic as I would like at the moment. I can play tunes on that until I get it right though.
I accept this is working around rather than solving the original problem but needs and timescales must. I think moving the end to end UI tests out of the main solution makes sense anyway but no doubt others may think differently.
Thanks for your help everyone

Instrumentation testing in Android Studio

I'm new to testing and currently trying to write some tests in Android Studio. I have a sample application module and now trying to figure out, whether the instrumentation test needs to be a module of its own or whether the tests should go inside the src folder... I have read contradicting information on the web. If anyone had a sample, that would be great!
With eclipse ADT plugin and older version of the SDK it was a requirement to put the integration tests in a separate module.
With the gradle build system and android-studio you should be able to put your integration tests in src/test/java and running them from the IDE or gradle command line without pain.
That's why you find contradicting information on the web.
Here is the reference
This post contains a very good explanantion on how to do the integration testing in Android Studio:
How can I create tests in Android Studio?

Play framework 2.0 continuous integration setup

I am looking for ideas for a Play 2.0 continuous integration setup. It would contain typical jobs like build after a git push, nightly builds with deployment to a test Heroku instance etc. Also code quality and test coverage metrics generation would be handy.
At the moment the stack looks like Play 2.0 with Java but that might change to Scala.
For "traditional" Java web app I would use Hudson/Jenkins. I found a Hudson plugin for Play but it doesn't seem to support Play 2.0. Is Hudson suitable tool here in general or what is your setup for Play 2.0 applications?
Play 2.0's build tool is just a thin wrapper around SBT. You should be able to use Hudson's sbt plugin to execute SBT build commands that are the equivalent of the Play commands you would execute from the console.
We execute the following under Bamboo for our builds:
SBT_OPTS="-Dsbt.log.noformat=true"
sbt clean compile test
(The SBT_OPTS variable turns off the colour formatting, making test output legible in log files.)
I found useful to add JUnit reporting plugin as I couldn't get test results to be displayed otherwise.
https://github.com/bseibel/sbt-simple-junit-xml-reporter-plugin
For PMD and Checkstyle I used this:
https://github.com/ymasory/sbt-code-quality.g8
For test coverage I am using JaCoCo at the moment:
http://ronalleva.com/2012/04/25/jacoco-and-play.html
Scct could be other option for coverage: http://mtkopone.github.com/scct/
With those and PMD, CheckStyle and JaCoCo plugins for Jenkins I have now quite ok setup for a Play 2 Java project.
here Is some detailed tutorial about doing It
http://wiki.cloudbees.com/bin/view/DEV/Playframework
It based on cloudbees but it would work fro any Jenkins Installation
You actually don't even need to use the SBT Plugin. I am running Play 2.1.1 on Jenkins and simply use the Execute Shell. I run something like the following:
cd ./your-play-project-root
play clean compile test stage
exit
This works quite well. "play" is simply just a thin wrapper around sbt.
"stage" will create a runnable in your target/server directory. Then, you can simply shell again to actually start your play application!

Hudson with MSBuild and MSTest, how to get code coverage

Do you have some opinion for code coverage in Hudson.. Now i have build with Msbuild and MSTest and that's work.
But for code coverage, i think i need some help. I have searched that somebody use nCover another with Emma. Which one is better and more easier ? And maybe reference to help me.
Best regard,
Are you .NET (NCover) or Java (Emma) or both?
NCover should work with Hudson but costs
Open Source projects exist look for PartCover and more recently OpenCover.
All three .NET tools support command-line and as such they should integrate with Hudson.
We are currently using dotCover by JetBrains. It's cheaper than NCover and it integrates well with Visual Studio. You don't have to use a separate application (NCover Explorer) to view your code with the covered/uncovered highlighting, which is great.
The command line version of dotCover allows you to create XML files of the analysis and you can parse the XML via <XmlRead> (in the MSBuild Community Tasks library) to parse the output.
It takes a while to get set up properly, but it works.

nightly build and virtual machines

At my place we are writing server side applications (WCF services) and we are looking forward automate the installation and run it in our nightly build process...
Moreover, we are looking forward installing it again and again on different servers...
We are searching for:
what is the best tool for nightly build?
(we are currently using TeamCity, but it is only good for CI not for the Nighty Build requirements)
Is there anyone who build its solutions\projects and install them on Virtual-Machines?
(Can you attach\link some automated code for this installation?)
Thanks.
Have a look at FinalBuilder
TeamCity is a great tool. It supports scheduling a build like CC.NET for nightly builds. What kind of issues are you having with it?
Try NAnt for the build:
http://nant.sourceforge.net/
and CruiseControl.NET for the continuous integration:
http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET
both are open source :-D
TeamCity will cope with nightly builds just as well as CC.Net etc.
Your comment
As far as I see this TC good enough
for CI not for NihgtlyBuild. Because
we cannot configure to install
windows-services, install on remote
machines, of course we can use Msbuild
but it will be hard to write all of
this.
It isn't particularly difficult to do any of this (IMO of course) using Microsoft.SDC.Tasks