index > Team Foundation Server - Build Automation > Web Tests during build fails Http 404 from website

Web Tests during build fails Http 404 from website


I am upgrading a 2003 solution to 2005 and am using Web Application add-in but, I am afraid that the set up of a team build that includes web tests is not clear to me. In addition to that deploying the app to multiple servers seems as easy as a 500 page soduku puzzle.

Anyway, the build I have set up fails when trying to run the web tests. When I recorded the web test, it was done using on the built in IIS at localhost:2435. I went ahead and created a web site on the build server to run on port 2435, but when the test task runs the web test receives a 404 error because the web application was not deployed. Shouldn't the script deploy the site prior to running the tests? Do I have to customize the build type file in order to deploy the web application?

Also, the application runs in the root directory of the IIS website but all of the examples I have read describe using a virtual directory to install the app. How does one install the app in the root of website?

Ariel Valentin

Team Build does not deploy websites out of the box. I believe the typical solution here is to use a web deployment project - check out http://msdn.microsoft.com/vstudio/teamsystem/reference/technotes/team_build/wdp.aspx for more information on this topic. The web deployment project add-in can be downloaded here: http://msdn.microsoft.com/asp.net/reference/infrastructure/wdp/.

-Aaron




http://blogs.msdn.com/aaronhallberg
Aaron Hallberg
Thanks for your prompt reply. I should have mentioned that I do have a web deployment project as part of the build. However for some reason the files are not deployed to the website when I run the build.
Ariel Valentin
So just to clarify, do I have to run 2 builds? One to deploy first and then another to test?
Ariel Valentin

I think you should be OK with one build - the deployment will happen, via the deployment project, as part of the compilation phase of the build (which comes before the testing phase).

-Aaron




http://blogs.msdn.com/aaronhallberg
Aaron Hallberg
the deployment will happen, via the deployment project, as part of the compilation phase of the build

Right now I am working on a Win 2003 server and am running a web application under its own web root and AFAICT the wizard that configures the deployment script does not allow one to create new sites but rather is limited to working with virtual directories on the default web site. Am I understanding this incorrectly?

Ariel Valentin

Ok. Using Copy task...

<Target Name="BeforeTest" >

<Message Text="I am running before the test"/>

<CreateItem Include="e:\autobuild\TestProject\BVT\Binaries\Mixed Platforms\Debug\_PublishedWebsites\MigrationSample\**\*.*">

<Output TaskParameter="Include" ItemName="FilesToMove"/>

</CreateItem>

<Copy SourceFiles="@(FilesToMove)"

DestinationFolder="e:\IIS websites\MigrationSample\%(FilesToMove.RecursiveDir)"

/>

</Target>

Ariel Valentin
reply 7

You can use google to search for other answers

 

More Articles

I can not execute building a web site in team builds?
why the daily build failed?
Debuger fails when trying to debug on the team build server
Location to post small TFS Build gig?
warning MSB3245
Getting detailed unit test results from Build
Found in and Integrated in fields valid values are not updated af...
TFS Error Branching... SQL Error 8152 ...String or binary data wo...
how to select which source to pull down for builds.
help link - nightly builds
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Changeset id and version id for file - s…
RTM: Using MSBUILD in batch file Build a…
TeamBuild error compiling websites (FILE)
$(VSINSTALLDIR) problem
error MSB3202
Converting build process to Team Build
Problem checking out binaries
Debuger fails when trying to debug on th…
Build failing - write permission problem.
MSB3021 errors when building solution th…
Pre-build validation failes for setup pr…
Problem with team build service
How to pass parmeters to TFSBUILD at run…
Is there a way to automate getting lates…
DLL's build on TFS is different and inco…

Hot Articles

Team Build and Wix.Targets
One build type for two branches of a sol…
Assemblyinfo task. AfterGet ...Unable to…
Where is the file, NightlyBuild.exe?
Looping and extracting all folder names …
Partitioning Team Build Type
Test not found in TFS build
Build Type problem
Automaticaly deployment to multiple envi…
Team Build over HTTP?
Check in Buid Policy
Unsubscribe an event.
Delete or Edit a build type
Team Build: SQL Error 512
Want to only send email on a specific Bu…

Recommend Articles

Adding copyfiles task to build script do…
Copying Specific Drop files from Develop…
Adding more events to the build report
Build failing - write permission problem.
Stopping the build committing when it fa…
Help with using Items and Properties in …
Can I build on a virtual machine?
Project reference
How to do strong name signing and digita…
BuildType for multiple solutions having …
Team Build: Object reference not set to …
Correlating Assembly Versions with Sourc…
Build fails with no errors in TFSBuild u…
Team Foundation Server Build Process
Team Build result not showing in the Bui…