ASP.NET Project Build Script For SVN and Cruise Control - msbuild

I have a project in ASP.NET MVC 3, the solution file contains 28 projects in total. This all is in a directory which is configured with tortoise SVN to always get the latest updates from SVN.
I have also installed curisecontrol on my VPS box, where these whole solution exist. I have also created a website in my IIS and everything is in order now.
Can anyone guide me into some tutorials for the following:
How to setup curise control web dashboard, so my clients can have look on the builds and its reports
How to use MSBuild with Cruise Control in some step by step tuts
Any sample build script with following features
Email notification on build fail or successful build
stop the deployment if build is not successfull and create a build report
Thanks in advance

How to use MSBuild with Cruise Control in some step by step tuts
http://www.codeproject.com/Articles/12985/Practical-NET2-and-C-2-An-introduction-to-MSBuild
By default, the web dashboard of ccnet displays the result of build without exact error messages. To display the error in web dashboard, go to “C:\Program Files\CruiseControl.NET\webdashboard” and open file “dashboard.config”.
There, you will find the below code:
Collapse | Copy Code
xsl\header.xsl
xsl\modifications.xsl
xsl\unittests.xsl
xsl\MsTestSummary.xsl
xsl\fxcop-summary.xsl
xsl\NCoverSummary.xsl
xsl\SimianSummary.xsl
xsl\fitnesse.xsl
Now add this line in the above code:
Collapse | Copy Code
xsl\compile-msbuild.xsl
Therefore the code will become:
<buildReportBuildPlugin>
<xslFileNames>
<xslFile>xsl\header.xsl</xslFile>
<xslFile>xsl\modifications.xsl</xslFile>
<xslFile>xsl\compile-msbuild.xsl</xslFile>
<xslFile>xsl\unittests.xsl</xslFile>
<xslFile>xsl\MsTestSummary.xsl</xslFile>
<xslFile>xsl\fxcop-summary.xsl</xslFile>
<xslFile>xsl\NCoverSummary.xsl</xslFile>
<xslFile>xsl\SimianSummary.xsl</xslFile>
<xslFile>xsl\fitnesse.xsl</xslFile>
</xslFileNames>
</buildReportBuildPlugin>
We can also send the email to the user groups if the build fails.
<workingDirectory>D:\Projects\TheWorks\Applications\ProjectFolder</workingDirectory>
<buildArgs>ProjectName.msbuild /p:Configuration=Debug</buildArgs>
<timeout>1800</timeout>
<!-- 30 minutes -->
<logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MSBuild.dll
</logger>
</msbuild>
</tasks>
<publishers>
<statistics />
<xmllogger />
<email from="EMAIL ADDRESS" mailhost="HOSTNAME"
mailhostPassword="PASSWORD" mailhostUsername="USERNAME"
includeDetails="true">
<users>
<user name="Jitendra Zaa"
address=ilovenagpur#gmail.com
group="AdminGroup" />
<user name="Santosh Karemore"
address=santosh.karemore#gmail.com
group="AdminGroup" />
<user name="Manoranjan sahoo"
address=manoranjan.sahoo#gmail.com
group="AdminGroup" />
<user name="Minal Shirsikar"
address="admin#shivasoft.in" group="Emul" />
</users>
<groups>
<group name="Emul" notification="failed" />
<group name="AdminGroup"
notification="failed" />
</groups>
</email>
</publishers>
</project>
The tags are self explanatory.
There may be following types of notification:
Failed
Fixed
Always

How to setup curise control web dashboard, so my clients can have look on the builds and its reports
-> you have to set a pwd in dashboard config file first and in web page, after set pwd you will be able to add plugin to make report like build report project report unit test report nant report check this url http://www.codeproject.com/Articles/70955/Set-up-the-Web-Dashboard-of-CCNet-to-Display-the-C
in ccnet documentation you will see all samples and step:
http://confluence.public.thoughtworks.org/display/CCNET/Documentation

Related

Trust anchor for certification path not found JMETER android testing

Hey im trying to do a mobile testing in JMeter, i've followed every step of this guide, and the recording works fine. The problem is that i have to record in a native app and when i try to log in i get the following error message:
java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
Im not sure what to do
Why you're asking us and not the author of "this guide"?
These "every steps" are not complete, there is a couple more "every steps" which you need to "follow"
In the application section of your app manifest add the following entry:
android:networkSecurityConfig="#xml/network_security_config
Add network_security_config.xml file to your application resources folder and copy the below code there:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
Re-compile your application in the debug mode:
gradlew assembleDebug
Replace the app you're trying to record with the debug .apk from the previous step
You should be able to record now
More information:
Android Network Security Configuration
Configure Android Devices for Proxy Recording

How to install Microsoft Access Runtime 2013 32-Bit Silently?

I am trying to install Microsoft Access Runtime 2013 32-Bit silently using quiet property, but still it is showing the Installation UI window and asking to accept EULA. Earlier I was using Access Database Engine 2007 which was getting installed silently with quiet command. What am I missing? I am using below code to install it silently:
<ExePackage DisplayName="Microsoft Access Runtime 2013"
SourceFile="..\Prerequisites\Microsoft Access x86 Runtime 2013\AccessRuntime_x86_en-us.exe"
InstallCommand="/quiet"
InstallCondition="NOT ACCESS_ENGINE=5"
Permanent="yes"
Compressed ="yes"
/>
Please read the following tips from itninja.com (formerly appdeploy.com):
https://www.itninja.com/software/microsoft/access-runtime/2013-14
https://www.itninja.com/question/packaging-access-runtime-2013
Essentially:
Extract files using AccessRuntime_x86_en-us.exe /extract:ExtractedFiles.
Create a config.xml as described in the links above. Let me just duplicate it here in case the links go dead. And obviously update the paths for your purpose and for your environment:
<Configuration Product="AccessRT">
<Display Level="None" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
<Logging Type="standard" Path="C:\Windows\Temp\" Template="Microsoft_Access_2013_Runtime_Setup(*).log" />
<COMPANYNAME Value="Company Name" />
<Setting Id="SETUP_REBOOT" Value="Never" />
</Configuration>
Install with setup.exe /config config.xml.

#Error Generation error: Unable to find plugin in the plugin search path: Baseclass.Contrib.SpecFlow.Selenium

I'm using specflow v1.9.0 Baseclass.Contrib.SpecFlow.Selenium.NUnit v1.3.1 and when I try to build the project, I'm seeing the below error
`#error Generation error: Unable to find plugin in the plugin search path: Baseclass.Contrib.SpecFlow.Selenium.NUnit. Please check http://go.specflow.org/doc-plugins for details.`
And in the App.config I got the below code
<specFlow>
<unitTestProvider name="SeleniumNUnit" />
<plugins>
<add name="Baseclass.Contrib.SpecFlow.Selenium.NUnit" path="..\packages\Baseclass.Contrib.SpecFlow.Selenium.NUnit.1.3.1\tools" />
</plugins>
<stepAssemblies>
<stepAssembly assembly="Baseclass.Contrib.SpecFlow.Selenium.NUnit.Bindings" />
</stepAssemblies>
</specFlow>
I encountered a similar error but with a different plugin and the steps outlined in Unable to find plugin in the plugin search path: SpecRun when saving / generating feature files resolved it for me:
1. Make sure the NuGet folders are properly restored.
2. Close Visual Studio.
3. Delete the bin\Debug folder from your project(s).
4. Reopen your solution in Visual Studio.
Make sure that in the given path the file "Baseclass.Contrib.SpecFlow.Selenium.NUnit.SpecFlowPlugin.dll" exists.
When are your *.feature.cs files generated? When you save the file or at build?
If it is at saving, regenerate the code behind file.
The solution above didnt work for me. The issue was only resolved when I've tried the following:
Go to VS->Tools->Options
Go to SpecFlow
Go to Test Execution
Change Test Runner Tool to something else than SpecRun and Auto (NUnit, MS...)
Build the project. This time it should work.
Change the Test Runner Tool back to SpecRun
Enjoy :)
Test Runner Tool option in Tools->Options
Still if you are facing same issue uninstall the plugin Baseclass.Contrib.SpecFlow.Selenium.NUnit and install it again

How do I change the default location for mule application log files?

I would like to change the log directory from MULE_HOME/logs to MULE_HOME/logs/apps. The only place I have found that refers to a file path is in MULE_HOME/conf/wrapper.conf. Editing the wrapper.logfile does allow me to relocate the mule_ee.log file, which seems to be the Mule application log, but I'd like to include Mule application logs there, too. If I create an application called FOO and deploy it to the runtime environment, it will create a file called MULE_HOME/logs/mule-app-FOO.log, but changing the location seems to be difficult short of completely messing things up writing custom log4j2 XML files.
If you have Mule version 3.6+, then it is recommended to use log4j2.xml instead of log4j.xml.... Using log4j2 you can change the path and get your application log ... a simple example would be :-
<RollingFile name="RollingFile" fileName="${env:MULE_HOME}/logs/${sys:CustomapplicationName}.log"
filePattern="${env:MULE_HOME}/logs/${sys:CustomapplicationName}-%d{yyyy-MM-dd}-%i.log"> <!-- CustomapplicationName is set at mule-app.properties or in VM argument in Run As Configure as -DCustomapplicationName=Log4j -->
<PatternLayout>
<pattern>%d{dd/MMM/yyyy HH:mm:ss,SSS}- %c{1}: %m%n</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="120 KB" />
</Policies>
<DefaultRolloverStrategy max="1" />
</RollingFile>
Just put this above code in your log4j2.xml in src/main/resource folder
Here in above you can see that, you have configured your path of your log files by mentioning here:-
<RollingFile name="RollingFile" fileName="${env:MULE_HOME}/logs/apps/${sys:CustomapplicationName}.log"
filePattern="${env:MULE_HOME}/logs/apps/${sys:CustomapplicationName}-%d{yyyy-MM-dd}-%i.log">
where ${sys:CustomapplicationName} is the System variable set in mule-app.properties as following :-
CustomapplicationName=yourApplicationName
Right way is to have log4j properties / xml file for FOO application and have that define the desired path for FOO application log. This way will ensure mule_ee.log is not messed up and at the same time other applications too will have their own log files which will be easy to manage and easy to introspect specific application log in case of errors / exceptions
Define location in log4j.properties file.

How can I change the value of $ProjectFileDir$ in IntelliJ IDEA 13?

I've added an item to my Tools menu using the XML below that runs custom actions for my project.
<?xml version="1.0" encoding="UTF-8"?>
<toolSet name="My Project Utilities">
<tool name="test" showInMainMenu="true" showInEditor="true" showInProject="true" showInSearchPopup="true" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="false">
<exec>
<option name="COMMAND" value="C:\path\to\ant.bat" />
<option name="PARAMETERS" value="my_task -Dmodule.dir=$ProjectFileDir$\my.module" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$/my.working.dir/foo" />
</exec>
</tool>
</toolSet>
When I try to run this task, I get this error:
Error running test:
Cannot start process, the working directory C:\projects\something\my.working.dir\foo does not exist
The problem is $ProjectFileDir$ points to the wrong directory, C:\projects\something, and I need it to point to C:\projects. Is there a way to change the value of $ProjectFileDir without modifying the value of WORKING_DIRECTORY in my XML?
we did the samething but with a batch file . uploading the batch file and adding the project path at working directory .
Go to File >> Settings >> External Tools >> Add (+) Create Tool , you can follow the image. Hope this helps.