2012-04-13 8 views
2

私たちは[TestFixture、Parallelizable] testfixturesと[Test(Order = X)、Parallelizable]テスト属性でmbunit gallioを使用していますが、X値を適用しても、テストが実行されている順番に影響を与えているようです。ここで何か間違っているのですか?[Test(Order)]を使用する際に特別なやり方があるのでしょうか、Parallelizableを使用していることが原因ですか?mbunit gallioはParallelizableを使用しているときにテストオーダーを無視しますか?

例:

[TestFixture, Parallelizable] 
    public class SignUpTests : BaseTest 
    { 

    [Test(Order = 2), Parallelizable] 
    public void SignUpProcessShouldBeEndedWithConfirmationPageAndWelcomeEmailSent() 
    { 
     blah-blah-blah; 
     blah-blah-blah; 
    } 

    // we expect this test to be executed before SignUpProcessShouldBeEndedWithConfirmationPageAndWelcomeEmailSent() 
    // but it's not the case 
    [Test(Order = 1), Parallelizable] 
    public void SignUpProcessShouldCompleteAndProvisionedServicesStatusUpdated() 
    { 
     blah-blah-blah; 
     blah-blah-blah; 

    } 

答えて

0

「テストケース1」であると言う、DEPENDSON属性を試しは「テストケース2」に依存して、テストケース2は、テストケース1が実行される第一および後に実行されます。

0
Include 'MbUnit.Framework.TestSequence(1)' and use ProcessTextFixture instead of TextFixture. 
    [ProcessTextFixture] 
public class TestSequeunce 
{ 

    [MbUnit.Framework.TestSequence(1)] 
    [TEST] 
    public void TestMethod1() 
    { 
    } 

    [MbUnit.Framework.TestSequence(2)] 
    [TEST] 
    public void TestMethod1() 
    { 
    }`enter code here` 
} 
関連する問題