Archive

Posts Tagged ‘Testing’

Running unit tests from a command line

February 23rd, 2019 No comments

VSTest.Console.exe should be used from .NET Framework 4.6.1 instead of MSTest.exe to run unit tests from command line.

MSTest.exe brings “No tests to execute” error message.

More info:

Code Analysis for C++

January 8th, 2016 No comments

run Visual Studio manage and unmanage unit tests from command line

January 28th, 2015 Comments off

MSTest is used for Managed C#, C++ Tests and Test Execution Command Line Tool (vstest.console.exe) for unmanaged C++ tests.

MSTest example:

>"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\MSTest.exe" /testcontainer:managed_unitTest.dll /testsettings:mysettings.testsettings

Test Execution Command Line Tool example:

>"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" unmanaged_unitTest.dll /Settings:mysettings.testsettings /platform:x86

 

Additional links:

Pocket C++

April 24th, 2014 No comments

Portable and easy to use editor to write and test C++11 snippets. It integrates Notepad++ and Stephan T. Lavavej’s MinGW Distro (GCC 4.8.1). You can use F9 key to compile C++ files, and Ctrl+F9 to execute the compiled program.

homepage

Windows Sysinternals and Sysinternals Live

February 2nd, 2012 No comments

The Sysinternals web site was created in 1996 by Mark Russinovich and Bryce Cogswell to host their advanced system utilities and technical information. Microsoft acquired Sysinternals in July, 2006. Whether you’re an IT Pro or a developer, you’ll find Sysinternals utilities to help you manage, troubleshoot and diagnose your Windows systems and applications. If you have a question about a tool or how to use them, please visit the Sysinternals Forum for answers and help from other users and our moderators.

Sysinternals Live is a service that enables you to execute Sysinternals tools directly from the Web without hunting for and manually downloading them. Simply enter a tool’s Sysinternals Live path into Windows Explorer or a command prompt as http://live.sysinternals.com/<toolname> or \\live.sysinternals.com\tools\<toolname>.

You can view the entire Sysinternals Live tools directory in a browser at live.sysinternals.com.

Or you can map the server to your drive:

net use y: \\live.sysinternals.com\tools

Software optimization resources

April 11th, 2010 No comments

Wireshark

January 16th, 2010 No comments

Wireshark is the world’s foremost network protocol analyzer, and is the de facto (and often de jure) standard across many industries and educational institutions.

Read more…

Create a dmp file from the application

October 25th, 2009 No comments
static LPTOP_LEVEL_EXCEPTION_FILTER m_previousFilter = NULL;


typedef BOOL (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType,
                                         CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
                                         CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,
                                         CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam);

static LONG WINAPI MyUnhandledExceptionFilter(PEXCEPTION_POINTERS pExceptionInfo)
{
    HMODULE hDll = ::LoadLibrary(_T("DBGHELP.DLL"));
    MINIDUMPWRITEDUMP pDump = (MINIDUMPWRITEDUMP)::GetProcAddress(hDll, "MiniDumpWriteDump");

    _MINIDUMP_EXCEPTION_INFORMATION ExInfo;
    ExInfo.ThreadId = ::GetCurrentThreadId();
    ExInfo.ExceptionPointers = pExceptionInfo;
    ExInfo.ClientPointers = NULL;

    MINIDUMP_CALLBACK_INFORMATION mci;

    // HANDLE hFile - minidamp file name(for example, "test.dmp")

    BOOL bOK = pDump(::GetCurrentProcess(), ::GetCurrentProcessId(),
                     hFile, 1, &ExInfo, NULL, &mci);
}


void main()
{
    // setup our own ExceptionHandler
    m_previousFilter = SetUnhandledExceptionFilter(MyUnhandledExceptionFilter);

    // actial work

    // befoe exit
    if (m_previousFilter)
    {
        SetUnhandledExceptionFilter(m_previousFilter);
    }
}

Microsoft Application Verifier

September 29th, 2009 No comments

Application Verifier is designed specifically to detect and help debug memory corruptions and critical security vulnerabilities.

This is achieved by monitoring a native application’s interaction with the Windows operating system, profiling its use of objects, the registry, the file system, and Win32 APIs (including heaps, handles, locks, etc), and indicating issues when and where they are discovered.

Application Verifier also includes checks to predict how well an application may perform under various account privileges. These compatibility tests are used in Windows Logo program.

Print verification tests are also available to verify your usage of the print subsystem.

Download

Additional links:

VMMap

September 18th, 2009 No comments

VMMap is a process virtual and physical memory analysis utility. It shows a breakdown of a process’s committed virtual memory types as well as the amount of physical memory (working set) assigned by the operating system to those types. Besides graphical representations of memory usage, VMMap also shows summary information and a detailed process memory map. Powerful filtering and refresh capabilities allow you to identify the sources of process memory usage and the memory cost of application features.

Besides flexible views for analyzing live processes, VMMap supports the export of data in multiple forms, including a native format that preserves all the information so that you can load back in. It also includes command-line options that enable scripting scenarios.

VMMap is the ideal tool for developers wanting to understand and optimize their application’s memory resource usage.

Download VMMap

Run VMMap now from Live.Sysinternals.com