If you are using MSTest here is the command windows batch command to generate test results
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\mstest.exe" /testcontainer: \yourTestProjectPath\YourTests.dll /testcontainer: \yourTestProjectPath2\YourTests2.dll /resultsfile:results.trx /testsettings:YourTestSettingsPath \local.testsettings
You can add several test projects using /testcontainer: argument. Here I have used two test projects. To use NCover we need to change this command by adding NCover commands . NCover arguments are started with “//” and for MSTest they started with “/”. Here Is the Ncover command to generate coverage.nccov and coverage.trend files.
"C:\Program files (x86)\NCover\NCover.Console.exe" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\mstest.exe" //x mstest_coverage.nccov //at "coverage.trend" /testcontainer: \yourTestProjectPath\YourTests.dll /testcontainer: \yourTestProjectPath2\YourTests2.dll /resultsfile:results.trx /testsettings:YourTestSettingsPath \local.testsettings
There are more options with NCover you can find those here Ncover command line
Now we have coverage.nccov and coverage.trend files we need to generate a HTML report from these two. For that we can use Ncover Reportng tool. Here is the Command to generate NCover HTML reports.
ncover.reporting mstest_coverage.nccov //lt coverage.trend //or FullCoverageReport:Html:output
Here we are generating full Coverage report in the directory called output
Tuesday, June 21, 2011
Tuesday, December 14, 2010
Sort UL element by the customized sorting funtion by JQuery
We can customize javascript sort() function for any requirement as given below. In this example
it sorts the List items according to text of the fist child.
function SortList() {
var listToSort = $('#tabmenu');
var listitems = listToSort.children('li').get();
listitems.sort(function (a, b) {
var contentA = $(a).first().text().toUpperCase();
var contentB = $(b).first().text().toUpperCase();
return (contentA != contentB) ? 1 : 0;
})
$.each(listitems, function (idx, itm) { listToSort.append(itm); });
}
You can customize this functionality as you want by changing these two lines of code
var contentA = $(a).first().text().toUpperCase();
var contentB = $(b).first().text().toUpperCase();
As an example,
If you want to sort list items according to the id of the first element you can change like this
var contentA = $(a).first().attr('id').toUpperCase();
var contentB = $(b).first().attr('id').toUpperCase();
Thursday, March 25, 2010
Simulated annealing approach to pagination problem
Currently i am involved in my the final year project which is for the ANCL (The Associated Newspapers of Ceylon Ltd.) . The main research area of that project is to give a solution to the pagination problem. We have four member in our team. My main contribution to the project is implementing the simulated annealing algorithm.
Here is my approach to do it.
My algorithm
This is a simplified version of the simulated annealing approach to the pagination problem. At first we place one large advertisement for each page in a section. This is for the regulations we have to follow in our implementation.(Largest advertisement should be in the bottom right corner in odd page ,bottom left corner in the even page).
Based on previous step result initial solution can be generated by placing the remaining ads.
when we placing the ads to the dummy we use three steps.
- width and height fit ad
- width or height fit ad
- random ad which reduces the energy
Subscribe to:
Posts (Atom)