protected virtual void InitRunnerTypes() { var runnerLibraries = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.RunnerLibraries); Trace.WriteLine(string.Format("Testing with runner libraries: [{0}]", runnerLibraries)); if (!string.IsNullOrEmpty(runnerLibraries)) { var libs = runnerLibraries.Split(','); foreach (var lib in libs) { ProvisionRunnerAssemblies.Add(lib); } } if (ProvisionRunnerAssemblies.Count == 0) { throw new ArgumentException("Cannot find any test runners. Please configure test runners via SPMeta2.Regression.Environment.ps1 script."); } // Test runners should be managed via SPMeta2.Regression.Environment.ps1 // Manual adding is for internal use only. // ProvisionRunnerAssemblies.Add("SPMeta2.Regression.Runners.O365.dll"); // ProvisionRunnerAssemblies.Add("SPMeta2.Regression.Runners.CSOM.dll"); //ProvisionRunnerAssemblies.Clear(); //ProvisionRunnerAssemblies.Add("SPMeta2.Containers.SSOM.dll"); }
public static string DomainUserEmail(this RandomService service) { var emailString = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.DefaultTestDomainUserEmails); if (!string.IsNullOrEmpty(emailString)) { var emails = emailString.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); return(emails[service.Int(emails.Length)]); } throw new Exception(string.Format("Environment value [{0}] is NULL", EnvironmentConsts.DefaultTestDomainUserEmails)); }
public override string ActiveDirectoryGroup() { var groups = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.DefaultTestADGroups); if (!string.IsNullOrEmpty(groups)) { var groupValues = groups.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); return(groupValues[Int(groupValues.Length)]); } throw new Exception(string.Format("Environment value [{0}] is NULL", EnvironmentConsts.DefaultTestADGroups)); }
public override string UserLogin() { var userLogins = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.DefaultTestUserLogins); if (!string.IsNullOrEmpty(userLogins)) { var logins = userLogins.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); return(logins[Int(logins.Length)]); } throw new Exception(string.Format("Environment value [{0}] is NULL", EnvironmentConsts.DefaultTestUserLogins)); }
public O365ProvisionRunner() { Name = "O365"; SiteUrls = new List <string>(); WebUrls = new List <string>(); LoadEnvironmentConfig(); InitServices(); UserName = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.O365_UserName); UserPassword = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.O365_Password); }
public ReverseTestBase() { SiteUrl = RunnerEnvironmentUtils.GetEnvironmentVariables(EnvironmentConsts.O365_SiteUrls).First(); UserName = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.O365_UserName); UserPassword = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.O365_Password); AssertService = new VSAssertService(); ModelGeneratorService = new ModelGeneratorService(); ModelGeneratorService.RegisterDefinitionGenerators(typeof(FieldDefinitionGenerator).Assembly); ModelGeneratorService.RegisterDefinitionGenerators(typeof(TaxonomyTermDefinitionGenerator).Assembly); Rnd = new DefaultRandomService(); }
public void CanDeploy_TaxonomyTermStoreById() { var termStoreId = ConvertUtils.ToGuid(RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.DefaultTaxonomyStoreId)); Assert.IsTrue(termStoreId.HasValue); var termStore = new TaxonomyTermStoreDefinition { Id = termStoreId.Value }; var model = SPMeta2Model .NewSiteModel(site => { site.AddTaxonomyTermStore(termStore); }); TestModel(model); }
public void CanDeploy_TaxonomyTermStoreByName() { var termStoreName = ConvertUtils.ToString(RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.DefaultTaxonomyStoreName)); Assert.IsFalse(string.IsNullOrEmpty(termStoreName)); var termStore = new TaxonomyTermStoreDefinition { Name = termStoreName }; var model = SPMeta2Model .NewSiteModel(site => { site.AddTaxonomyTermStore(termStore); }); TestModel(model); }
public void CanDeploy_SecurityGroup_Under_SecurityGroup() { var activeDirectoryOrGlobalO365Groups = RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.DefaultTestADGroups) .Split(','); var randomNestedGroup = Rnd.RandomFromArray(activeDirectoryOrGlobalO365Groups); var spGroup = ModelGeneratorService.GetRandomDefinition <SecurityGroupDefinition>(); var domainGroup = ModelGeneratorService.GetRandomDefinition <SecurityGroupDefinition>(def => { def.Name = randomNestedGroup; }); var siteModel = SPMeta2Model .NewSiteModel(site => { site.AddSecurityGroup(spGroup, group => { group.AddSecurityGroup(domainGroup); }); }); TestModels(new ModelNode[] { siteModel }); }
public override string DbServerName() { return(string.Format("{0}", RunnerEnvironmentUtils.GetEnvironmentVariable(EnvironmentConsts.DefaultSqlServerName))); }