CA-109237: Add a smoke test category for the xenadmin tests

Added a smoke test category and assigned a selection of tests to this category
to get a broad coverage of XenCenter functionality which can be used to quickly
test XenCenter works on a given platform
This commit is contained in:
Chris Harding 2013-07-09 16:03:49 +01:00
parent 58e187d981
commit 06daa96ed4
30 changed files with 58 additions and 53 deletions

View File

@ -39,7 +39,7 @@ using XenCenterLib.Archive;
namespace XenAdminTests.ArchiveTests
{
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
class ArchiveWriterTests
{
private class FakeArchiveWriter : ArchiveWriter

View File

@ -39,7 +39,7 @@ using XenCenterLib.Archive;
namespace XenAdminTests.ArchiveTests
{
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class TarArchiveWriterTests : ThirdPartyArchiveWriterTest
{
[TestFixtureSetUp]
@ -50,7 +50,7 @@ namespace XenAdminTests.ArchiveTests
}
}
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class ZipArchiveWriterTests : ThirdPartyArchiveWriterTest
{
[TestFixtureSetUp]

View File

@ -38,7 +38,7 @@ using XenAdmin;
namespace XenAdminTests.CommandTests
{
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class AddHostCommandTestSetup : MainWindowLauncher_TestFixture
{
public AddHostCommandTestSetup()

View File

@ -57,7 +57,7 @@ namespace XenAdminTests.CommandTests
}
}
[Test]
[Test, Category(TestCategories.SmokeTest)]
[TestCase(true, Description = "Is LunPerVdi", Result = false)]
[TestCase(false, Description = "Is Not LunPerVdi", Result = true)]
public bool VerifyLunPerVdiBehaviour(bool IsLunPerVdi)
@ -75,7 +75,7 @@ namespace XenAdminTests.CommandTests
return cmd.CanExecute();
}
[Test]
[Test, Category(TestCategories.SmokeTest)]
[TestCase(true, Description = "Wlb enabled", Result = false)]
[TestCase(false, Description = "Wlb disabled", Result = true)]
public bool IntrapoolWlbEnabledBehaviour(bool WlbEnabled)
@ -97,7 +97,7 @@ namespace XenAdminTests.CommandTests
}
[Test]
[Test, Category(TestCategories.SmokeTest)]
[TestCase(true, true, Description = "Wlb enabled both", Result = false)]
[TestCase(false, false, Description = "Wlb disabled both", Result = true)]
[TestCase(true, false, Description = "Wlb enabled VM", Result = false)]

View File

@ -35,7 +35,7 @@ using NUnit.Framework;
namespace XenAdminTests.CommandTests
{
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class DRConfigureCommandTestBoston : MainWindowLauncher_TestFixture
{
public DRConfigureCommandTestBoston()

View File

@ -38,7 +38,7 @@ using NUnit.Framework;
namespace XenAdminTests.CommandTests
{
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class DeleteVMCommandTestGeorge : MainWindowLauncher_TestFixture
{
public DeleteVMCommandTestGeorge()
@ -53,7 +53,7 @@ namespace XenAdminTests.CommandTests
}
}
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class DeleteVMCommandTestMidnightRide : MainWindowLauncher_TestFixture
{
public DeleteVMCommandTestMidnightRide()

View File

@ -38,7 +38,7 @@ using NUnit.Framework;
namespace XenAdminTests.CommandTests
{
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class DisconnectHostCommandTestGeorge : MainWindowLauncher_TestFixture
{
public DisconnectHostCommandTestGeorge()
@ -53,7 +53,7 @@ namespace XenAdminTests.CommandTests
}
}
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class DisconnectHostCommandTestMidnightRide : MainWindowLauncher_TestFixture
{
public DisconnectHostCommandTestMidnightRide()

View File

@ -41,7 +41,7 @@ using NUnit.Framework;
namespace XenAdminTests.CommandTests
{
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class ShutDownHostCommandTestGeorge : MainWindowLauncher_TestFixture
{
public ShutDownHostCommandTestGeorge()
@ -56,7 +56,7 @@ namespace XenAdminTests.CommandTests
}
}
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class ShutDownHostCommandTestMidnightRide : MainWindowLauncher_TestFixture
{
public ShutDownHostCommandTestMidnightRide()
@ -71,7 +71,7 @@ namespace XenAdminTests.CommandTests
}
}
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class ShutDownHostCommandTestRbacGeorge : MainWindowLauncher_TestFixture
{
public ShutDownHostCommandTestRbacGeorge()
@ -86,7 +86,7 @@ namespace XenAdminTests.CommandTests
}
}
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class ShutDownHostCommandTestRbacMidnightRide : MainWindowLauncher_TestFixture
{
public ShutDownHostCommandTestRbacMidnightRide()

View File

@ -38,7 +38,7 @@ using XenCenterLib.Compression;
namespace XenAdminTests.CompressionTests
{
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class GzipCompressionTests : ThirdPartyCompressionTests
{
[TestFixtureSetUp]
@ -49,7 +49,7 @@ namespace XenAdminTests.CompressionTests
}
}
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class Bzip2CompressionTests : ThirdPartyCompressionTests
{
[TestFixtureSetUp]

View File

@ -39,7 +39,7 @@ using XenAdmin.Wizards.NewVMWizard;
namespace XenAdminTests.DialogTests.state1_xml.DialogsForConnection
{
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class AddServerDialogTest_true : DialogTest<AddServerDialog>
{
protected override AddServerDialog NewDialog()
@ -48,7 +48,7 @@ namespace XenAdminTests.DialogTests.state1_xml.DialogsForConnection
}
}
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class AddServerDialogTest_false : DialogTest<AddServerDialog>
{
protected override AddServerDialog NewDialog()
@ -58,7 +58,7 @@ namespace XenAdminTests.DialogTests.state1_xml.DialogsForConnection
}
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class ConnectingToServerDialogTest : DialogTest<ConnectingToServerDialog>
{
IXenConnection connection = null;

View File

@ -38,7 +38,7 @@ using XenAPI;
namespace XenAdminTests.DialogTests.state1_xml.DialogsForVM
{
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class AttachDiskDialogTest : DialogTest<AttachDiskDialog>
{
protected override AttachDiskDialog NewDialog()
@ -128,7 +128,7 @@ namespace XenAdminTests.DialogTests.state1_xml.DialogsForVM
}
}
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class CopyVMDialogTest_DefaultTemplate : DialogTest<CopyVMDialog>
{
protected override CopyVMDialog NewDialog()

View File

@ -43,7 +43,7 @@ namespace XenAdminTests.DialogTests.LicenseManager.SelectionVerifiers
{
public class CanUseLicenseServerVerifierTests : UnitTester_SingleConnectionTestFixture
{
[Test]
[Test, Category(TestCategories.SmokeTest)]
[TestCase(0, 0, Status.Error)]
[TestCase(1, 0, Status.OK)]
[TestCase(0, 1, Status.Error)]

View File

@ -34,7 +34,7 @@ using XenAdmin.Dialogs;
namespace XenAdminTests.DialogTests.boston.MessageBoxTestTests
{
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class MessageBoxTestTests : DialogTest<MessageBoxTest>
{
protected override MessageBoxTest NewDialog()

View File

@ -53,7 +53,7 @@ namespace XenAdminTests.DialogTests.state1_xml.PropertiesDialogTests
}
}
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class PropertiesDialogTest_Host : VerticallyTabbedDialogTest<PropertiesDialog>
{
public PropertiesDialogTest_Host()
@ -169,7 +169,7 @@ namespace XenAdminTests.DialogTests.state1_xml.PropertiesDialogTests
}
}
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class PropertiesDialogTest_VDI : VerticallyTabbedDialogTest<PropertiesDialog>
{
public PropertiesDialogTest_VDI()

View File

@ -153,7 +153,7 @@ namespace XenAdminTests.FolderTests
}
}
[TestFixture, Category(TestCategories.UICategoryA)]
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
public class FolderTest_Create : FolderTest
{
protected override void DoAction()

View File

@ -78,7 +78,7 @@ namespace XenAdminTests.LicensingTests
return rows;
}
[Test]
[Test, Category(TestCategories.SmokeTest)]
public void ButtonEnablementForNoSelection()
{
LicenseManagerController licenseSummary = new LicenseManagerController(view.Object);
@ -90,7 +90,7 @@ namespace XenAdminTests.LicensingTests
view.Verify(v => v.DrawActivateButtonAsHidden(false));
}
[Test]
[Test, Category(TestCategories.SmokeTest)]
public void ButtonEnablementForUnlicensedClearwaterSelection()
{
LicenseManagerController licenseSummary = new LicenseManagerController(view.Object)
@ -111,7 +111,7 @@ namespace XenAdminTests.LicensingTests
view.Verify(v => v.DrawActivateButtonAsHidden(true));
}
[Test]
[Test, Category(TestCategories.SmokeTest)]
public void ButtonEnablementForLicensedClearwaterSelection()
{
LicenseManagerController licenseSummary = new LicenseManagerController(view.Object)
@ -135,7 +135,7 @@ namespace XenAdminTests.LicensingTests
}
[Test]
[Test, Category(TestCategories.SmokeTest)]
public void ButtonEnablementForTwoLicensedClearwaterSelection()
{
LicenseManagerController licenseSummary = new LicenseManagerController(view.Object)
@ -166,7 +166,7 @@ namespace XenAdminTests.LicensingTests
view.Verify(v => v.DrawActivateButtonAsDisabled(false));
}
[Test]
[Test, Category(TestCategories.SmokeTest)]
public void ButtonEnablementForTwoMixedLicenseClearwaterSelection()
{
LicenseManagerController licenseSummary = new LicenseManagerController(view.Object)
@ -197,7 +197,7 @@ namespace XenAdminTests.LicensingTests
view.Verify(v => v.DrawActivateButtonAsDisabled(false));
}
[Test]
[Test, Category(TestCategories.SmokeTest)]
public void ButtonEnablementForUnlicensedTampaSelection()
{
LicenseManagerController licenseSummary = new LicenseManagerController(view.Object)
@ -222,7 +222,7 @@ namespace XenAdminTests.LicensingTests
view.Verify(v => v.DrawActivateButtonAsDisabled(false));
}
[Test]
[Test, Category(TestCategories.SmokeTest)]
public void ButtonEnablementForMulitpleMixedTampaSelection()
{
LicenseManagerController licenseSummary = new LicenseManagerController(view.Object)
@ -254,7 +254,7 @@ namespace XenAdminTests.LicensingTests
view.Verify(v => v.DrawActivateButtonAsDisabled(false));
}
[Test]
[Test, Category(TestCategories.SmokeTest)]
public void ButtonEnablementForLicensedTampaSelection()
{
LicenseManagerController licenseSummary = new LicenseManagerController(view.Object)
@ -279,7 +279,7 @@ namespace XenAdminTests.LicensingTests
view.Verify(v => v.DrawActivateButtonAsDisabled(false));
}
[Test]
[Test, Category(TestCategories.SmokeTest)]
public void ButtonEnablementForUnactivatableHosts()
{
LicenseManagerController licenseSummary = new LicenseManagerController(view.Object)
@ -304,7 +304,7 @@ namespace XenAdminTests.LicensingTests
view.Verify(v => v.DrawActivateButtonAsDisabled(true));
}
[Test]
[Test, Category(TestCategories.SmokeTest)]
public void ButtonEnablementForFailingVerifier()
{
LicenseManagerController licenseSummary = new LicenseManagerController(view.Object)

View File

@ -37,7 +37,7 @@ using XenAdmin.XenSearch;
namespace XenAdminTests.SearchUnitTests
{
[TestFixture, Category(TestCategories.UICategoryB)]
[TestFixture, Category(TestCategories.UICategoryB), Category(TestCategories.SmokeTest)]
class MatchTests_Date
{
[Test, Sequential]

View File

@ -39,7 +39,7 @@ using XenAdmin.Model;
namespace XenAdminTests.TabsAndMenus
{
[TestFixture, Category(TestCategories.UICategoryB)]
[TestFixture, Category(TestCategories.UICategoryB), Category(TestCategories.SmokeTest)]
public class TabsAndMenusTampa : TabsAndMenus
{
public TabsAndMenusTampa()

View File

@ -55,6 +55,11 @@ namespace XenAdminTests
/// </summary>
public const string Unit = "Unit";
/// <summary>
/// Smoke tests
/// </summary>
public const string SmokeTest = "SmokeTest";
}
}

0
XenAdminTests/TreeTests/MainWindowTreeBuilderTests.cs Normal file → Executable file
View File

View File

@ -41,7 +41,7 @@ using XenAPI;
namespace XenAdminTests.UnitTests.AlertTests
{
[TestFixture, Category(TestCategories.Unit)]
[TestFixture, Category(TestCategories.Unit), Category(TestCategories.SmokeTest)]
public class XenServerPatchAlertTests
{
private Mock<IXenConnection> connA;

View File

@ -37,7 +37,7 @@ using XenAPI;
namespace XenAdminTests.UnitTests.Diagnostics
{
[TestFixture]
[TestFixture, Category(TestCategories.SmokeTest)]
public class HotFixFactoryTests : UnitTester_TestFixture
{
private const string id = "test";

View File

@ -37,7 +37,7 @@ using System.Collections.Generic;
namespace XenAdminTests.UnitTests.Diagnostics
{
[TestFixture, Category(TestCategories.Unit)]
[TestFixture, Category(TestCategories.Unit), Category(TestCategories.SmokeTest)]
public class MultipleHotfixTests
{
private Mock<Hotfix> hotfixA;

View File

@ -37,7 +37,7 @@ using XenAdmin.Wizards;
namespace XenAdminTests.WizardTests.state1_xml.BugToolWizardTests
{
[TestFixture, Category(TestCategories.UICategoryB)]
[TestFixture, Category(TestCategories.UICategoryB), Category(TestCategories.SmokeTest)]
public class BugToolWizardTest : WizardTest<BugToolWizard>
{
public BugToolWizardTest()

0
XenAdminTests/WizardTests/ExportWizardTest.cs Normal file → Executable file
View File

View File

@ -39,7 +39,7 @@ using XenAdmin.Wizards;
namespace XenAdminTests.WizardTests.state1_xml.HAWizardTests
{
[TestFixture, Category(TestCategories.UICategoryB)]
[TestFixture, Category(TestCategories.UICategoryB), Category(TestCategories.SmokeTest)]
public class HAWizardTest : WizardTest<HAWizard>
{
public HAWizardTest()

View File

@ -40,7 +40,7 @@ using XenAdmin.Wizards.NewSRWizard_Pages.Frontends;
namespace XenAdminTests.WizardTests.state1_xml.NewSRWizardTests
{
[TestFixture, Category(TestCategories.UICategoryB)]
[TestFixture, Category(TestCategories.UICategoryB), Category(TestCategories.SmokeTest)]
public class NewSRWizardTest_NFS : WizardTest<NewSRWizard>
{
public NewSRWizardTest_NFS()
@ -107,7 +107,7 @@ namespace XenAdminTests.WizardTests.state1_xml.NewSRWizardTests
}
}
[TestFixture, Category(TestCategories.UICategoryB)]
[TestFixture, Category(TestCategories.UICategoryB), Category(TestCategories.SmokeTest)]
public class NewSRWizardTest_iSCSI : WizardTest<NewSRWizard>
{
public NewSRWizardTest_iSCSI()
@ -243,7 +243,7 @@ namespace XenAdminTests.WizardTests.state1_xml.NewSRWizardTests
}
}
[TestFixture, Category(TestCategories.UICategoryB)]
[TestFixture, Category(TestCategories.UICategoryB), Category(TestCategories.SmokeTest)]
public class NewSRWizardTest_CIFS : WizardTest<NewSRWizard>
{
public NewSRWizardTest_CIFS()

View File

@ -43,7 +43,7 @@ using System.Xml;
namespace XenAdminTests.WizardTests.state1_xml.NewVMWizardTests
{
[TestFixture, Category(TestCategories.UICategoryB)]
[TestFixture, Category(TestCategories.UICategoryB), Category(TestCategories.SmokeTest)]
public class NewVMWizardTestSpecificHost : WizardTest<NewVMWizard>
{
public NewVMWizardTestSpecificHost()
@ -117,7 +117,7 @@ namespace XenAdminTests.WizardTests.state4_xml.NewVMWizardTests
}
}
[TestFixture, Category(TestCategories.UICategoryB)]
[TestFixture, Category(TestCategories.UICategoryB), Category(TestCategories.SmokeTest)]
public class NewVMWizardTestWindowsTemplate : WizardTest<NewVMWizard>
{
public NewVMWizardTestWindowsTemplate()

View File

@ -37,7 +37,7 @@ using XenAdmin.Wizards.RollingUpgradeWizard;
namespace XenAdminTests.WizardTests.state5_xml
{
[TestFixture, Category(TestCategories.UICategoryB)]
[TestFixture, Category(TestCategories.UICategoryB), Category(TestCategories.SmokeTest)]
class RollingUpgradeWizardTest : WizardTest<RollingUpgradeWizard>
{
public RollingUpgradeWizardTest()

View File

@ -42,7 +42,7 @@ using System.Threading;
namespace XenAdminTests.XenModelTests
{
[TestFixture, Category(TestCategories.UICategoryB)]
[TestFixture, Category(TestCategories.UICategoryB), Category(TestCategories.SmokeTest)]
public class PureAsyncActionTests : ActionTestBase
{