public void setupEnvironment()
        {
            Commands cmd = new Commands();

            cmd.performOneCommand(Commands.COMMAND_CLEAR_GLOBAL);
            SampleUtil.loadVM();
            ConfigurationBuilder.vg = VariantGeneratorFactory.GetVariantGenerator("z3");
        }
Esempio n. 2
0
        public static bool testOptionalNumSample()
        {
            VariabilityModel     withOptional        = SampleUtil.loadOptionalVM();
            List <Configuration> sampledWithOptional = SampleUtil.sampleWholePopulation(withOptional);

            return(7 == sampledWithOptional.Count && sampledWithOptional.Exists(x =>
                                                                                x.BinaryOptions.ContainsKey(withOptional.AbrstactOptions[0])));
        }
Esempio n. 3
0
        public void setupEnvironment()
        {
            Commands cmd = new Commands();

            cmd.performOneCommand(Commands.COMMAND_CLEAR_GLOBAL);

            if (file != null)
            {
                string path = Path.GetFullPath(Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "..//..//.."))
                              + Path.DirectorySeparatorChar + "ExampleFiles"
                              + Path.DirectorySeparatorChar + file;
                SampleUtil.loadVM(path);
            }
            else
            {
                SampleUtil.loadVM();
            }


            ConfigurationBuilder.vg = VariantGeneratorFactory.GetVariantGenerator("z3");
        }
Esempio n. 4
0
 public void TestDistributionAwareSolverSelection()
 {
     Assert.True(SampleUtil.TestDistributionAwareSolverSelection("z3", 217,
                                                                 0, "SolverSelection", "True"));
 }
Esempio n. 5
0
 public void TestBinaryRandom()
 {
     Assert.True(SampleUtil.TestBinaryRandom("z3", 308, "asTW2", 15));
 }
Esempio n. 6
0
 public void TestDistributionAware()
 {
     Assert.True(SampleUtil.TestHybridStrategy("msSolver", EXPECTED_DIST_AW, 0
                                               , new DistributionAware(), "DistributionAwareCompleteConfigurations"));
 }
Esempio n. 7
0
 public void TestHypersampling()
 {
     Assert.True(SampleUtil.TestHypersampling("z3", 176, 50));
 }
Esempio n. 8
0
 public void TestFeatureWise()
 {
     Assert.True(SampleUtil.TestBinaryNoParam(70, "z3"
                                              , SamplingStrategies.OPTIONWISE, "FeaturewiseSampling.csv"));
 }
Esempio n. 9
0
 public void TestNegFeatureWise()
 {
     Assert.True(SampleUtil.TestBinaryNoParam(105, "z3"
                                              , SamplingStrategies.NEGATIVE_OPTIONWISE, "NegFWSampling.csv"));
 }
Esempio n. 10
0
 public void TestBoxBehnken()
 {
     Assert.True(SampleUtil.TestBoxBehnken("msSolver", EXPECTED_BOXBEHNKEN));
 }
Esempio n. 11
0
 public void TestHypersampling()
 {
     Assert.True(SampleUtil.TestHypersampling("msSolver", EXPECTED_HYPERSAMPLING_50, 50));
     Assert.True(SampleUtil.TestHypersampling("msSolver", EXPECTED_HYPERSAMPLING_40, 40));
 }
Esempio n. 12
0
 public void TestNegFeatureWise()
 {
     Assert.True(SampleUtil.TestBinaryNoParam(EXPECTED_NEG_FEATURE_WISE, "msSolver"
                                              , SamplingStrategies.NEGATIVE_OPTIONWISE, "NegFWSampling.csv"));
 }
Esempio n. 13
0
 public void TestFeatureWise()
 {
     Assert.True(SampleUtil.TestBinaryNoParam(EXPECTED_OPTIONWISE, "msSolver"
                                              , SamplingStrategies.OPTIONWISE, "FeaturewiseSampling.csv"));
 }
Esempio n. 14
0
 public void TestLoadingTestVM()
 {
     Assert.IsTrue(SampleUtil.loadVM());
 }
Esempio n. 15
0
 public void TestDistributionAwareSolverSelection()
 {
     Assert.True(SampleUtil.TestDistributionAwareSolverSelection("msSolver", EXPECTED_DIST_AW_SOLVER
                                                                 , 0, "SolverSelection", "True"));
 }
Esempio n. 16
0
 public void TestDistributionPreserving()
 {
     Assert.True(SampleUtil.TestHybridStrategy("msSolver", EXPECTED_DIST_PRESERVING, 0
                                               , new DistributionPreserving(), "DistributionPreserving"));
 }
Esempio n. 17
0
 public void TestTWise()
 {
     setupEnvironment();
     Assert.True(SampleUtil.TestTWise("z3", 602, 3));
 }
Esempio n. 18
0
 public void TestOneFactorAtATime()
 {
     Assert.True(SampleUtil.TestOneFactorAtATime("msSolver", EXPECTED_ONE_FACTOR_AT_A_TIME_5, 5));
     Assert.True(SampleUtil.TestOneFactorAtATime("msSolver", EXPECTED_ONE_FACTOR_AT_A_TIME_3, 3));
 }
Esempio n. 19
0
 public void TestSamplingOptionalNumeric()
 {
     Assert.That(SampleUtil.testOptionalNumSample());
 }
Esempio n. 20
0
 public void TestNumericRandom()
 {
     Assert.True(SampleUtil.TestNumericRandom("msSolver", EXPECTED_RANDOM_12_1, 1, 12));
     Assert.True(SampleUtil.TestNumericRandom("msSolver", EXPECTED_RANDOM_10_0, 0, 10));
 }
Esempio n. 21
0
 public void testWholePop()
 {
     Assert.True(SampleUtil.TestBinaryNoParam(SampleUtil.EXPECTED_CENTRALCOMP_ALLBINARY, "z3",
                                              SamplingStrategies.ALLBINARY, "AllbinarySampling.csv"));
 }
Esempio n. 22
0
 public void TestPlackettBurman()
 {
     Assert.True(SampleUtil.TestPlackettBurman("msSolver", EXPECTED_PLACKETT_BURMAN_3_9, 3, 9));
     Assert.True(SampleUtil.TestPlackettBurman("msSolver", EXPECTED_PLACKETT_BURMAN_5_125, 5, 125));
 }
Esempio n. 23
0
 public void TestPairwise()
 {
     Assert.True(SampleUtil.TestBinaryNoParam(EXPECTED_PAIRWISE, "z3"
                                              , SamplingStrategies.PAIRWISE, "PairwiseSampling.csv"));
 }
Esempio n. 24
0
 public void TestNumericRandom()
 {
     Assert.True(SampleUtil.TestNumericRandom("z3", 352, 1, 8));
 }
Esempio n. 25
0
 public void TestBoxBehnken()
 {
     Assert.True(SampleUtil.TestBoxBehnken("z3", 220));
 }
Esempio n. 26
0
 public void TestTWise()
 {
     Assert.True(SampleUtil.TestTWise("msSolver", EXPECTED_T_WISE_3, 3));
     Assert.True(SampleUtil.TestTWise("msSolver", EXPECTED_T_WISE_2, 2));
 }
Esempio n. 27
0
 public void TestOneFactorAtATime()
 {
     Assert.True(SampleUtil.TestOneFactorAtATime("z3", 220, 5));
 }
Esempio n. 28
0
 public void TestBinaryRandom()
 {
     Assert.True(SampleUtil.TestBinaryRandom("msSolver", EXPECTED_BINARY_RANDOM_TW_15, "asTW", 15));
 }
Esempio n. 29
0
 public void TestPlackettBurman()
 {
     Assert.True(SampleUtil.TestPlackettBurman("z3", 264, 3, 9));
 }
Esempio n. 30
0
 public void TestKExchange()
 {
     Assert.True(SampleUtil.TestKExchange("z3", 264, 7, 2));
 }