Pages

Monday, May 24, 2010

Code Analysis, Code metrics and Profiling

In Visual Studio 2008, you can also see a new menu in the main menu named Analyze menu. There are mainly three commands: Run Code Analysis, Calculate Code Metrics and Profiling. The Code Analysis menu provides a report with the main changes to do in order to find errors and comply with best practices of the technology. The Code Metrics menu helps users find and act upon complex area of the application through metrics that are applied to your code. Let's see an example of running Code Metrics over our examples. In this report, we have some metrics such as Class Coupling, Depth in Inheritance, Cyclomatic Complexity, Lines of Code, and Maintainability Index.

Class Coupling indicates the number of dependencies between entities of your problem domain. Lower number indicates candidates for possible reuse.

Depth in Inheritance indicates the number of classes that are above in the inheritance tree from a particular class.

Cyclomatic Complexity indicates the total number of individual path through the code. It's calculated by counting the number of decision points (if, switch, do, while, foreach, for) and adding 1.

Lines of Code indicate the total number of lines of code excluding white space, comments, braces, declaration of members, types and namespaces.

Maintainability Index is an index from 0 to 100 indicating the overall maintainability of a member or a type (at assembly level,it's the total number of maintainability index of all types within it). It's calculated from other metrics such as Halstead Volume (which factors in the number and use of operands and operators), Cyclomatic Complexity and Lines of Code. Lower values indicate complex and hard to maintain. The report of this field also indicates the status with an icon.

Code Analysis

Microsoft is making the visual studio to be used more secure and quality.
It has introduced code analysis and code metrics to check the health condition of the application and also it digs deep and indentifies the un-maintainable complex hotspots.

Other new features of the code analysis are to provide running the code analysis before check in the code. Along with analyzing the anonymous types and lambda expressions, including additional checking on security, globalization, spelling, grammar and following the best practices.

And also it analysis performance improvements that cut analysis time over managed code by two times, and use half as much memory than in Visual Studio 2005

Saturday, May 15, 2010

IIS Error: Changing the application's trust level in the configuration file

Error Description while browsing the website under IIS


"The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file."

Initially I deleted the virtual directory, created again, set the permission to anonymous, set the browse and execute permissions, no solution.

Then after doing many trials, I found out the basic problem reading the error "not allowed by the security policy".
In web configuration file if we set the security policy to Fully Trusted, then problem solved and application working fine.

or

Set the trust level to the main configuration file in the "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config"

To access the "TFS web access", team expolorer installation is needed?

Yes and No

If the developer or tester has team explorer installed in thier systems, then they can use the TFS web Access URL for managing all other than the check-in check=-out code.

(or)

If the organization has the TFS CAL, then every one under CAL access the "TFS web access" with out installing the team explorer in individual systems. No need to get procured per seat 500$ for getting the web access.

Team Explorer - Team Web Access

In my opinion, for developers and testers Team Explorer is better solution because they use Visual Studio in their everyday work. This integration can be even more natural if the development team uses TFS to check-in code and if you setup links between code check-in and work items.

On the other hand, for project managers, business analysts, etc. TFS Web Access will be better solution - in this scenario, they do not need Team Explorer on their workstations. Anyhow, for reporting Team Explorer is pretty useless...

But one question every one have that is....

How can we get the TFS web access with out having the team explorer?
check in my next posting

Thursday, May 6, 2010

Team Foundation Server Web Access

Is there any way to do all processes which can be done by TFS client?

The current question is how a QA /Testers can log defects with out the TFS Client?

Yes, Microsoft give Team Foundation server do all common tasks when you work with Team Foundation Server client.

Yes, we can do this, Visual Studio Team Foundation Server provides the Team System Web Access which is a customizable Web interface that can access Team Foundation Server project data.

It acts as a client of Team Foundation Server and provides most, but not all, of the functionality available through the Team Explorer client.

You can use Team System Web Access through a remote connection to perform the following functions:

  • Create, view, query for, and track bugs / work items.
  • View / Check / Get the latest version / Specific version from the Source Code
  • Manage a project's document libraries.
  • View version-controlled files and related version information.
  • Manage the software build process by running builds and reviewing build results.
  • Generate reports to track status and trend information over time for a team project.
  • Customize browser themes and user settings.

Please find the below link run the TFS web page to do all transactions.

http://ushoutfs01v:8090 -> Select the project -> do things….