RunAs LowIL

TAEF runs the test within a Low Integrity Level process.

Note  

Note  On computers running versions of Windows older than Windows Vista, this option is not supported.

Specifying RunAs on the Command Line

te unittests\* /runas:lowil

Marking Tests with RunAs

Test metadata can be used to specify the runas type of an assembly, class or test method.

Note  RunAs values specified in metadata override RunAs values specified on the command line. For example, a test marked with runas:system test metadata will still be run as Local System even if /runas:elevated is specified on the command line.

Example (native code)

class MyTests
{
    TEST_CLASS(MyTests);

    BEGIN_TEST_METHOD(LowILTest)
        TEST_METHOD_PROPERTY(L"RunAs", L"LowIL")
    END_TEST_METHOD()
};

RunAs