Examples of TestType


Examples of com.indeed.proctor.common.model.TestType

        // rule: " "
        final String[] emptyRules = new String[] { null, "", " " };
        final Range range = new Range(0, 1.0d);

        final String version = "100";
        final TestType testType = TestType.ANONYMOUS_USER;
        final String salt = "testsalt";
        final List<TestBucket> buckets = fromCompactBucketFormat("inactive:-1,control:0,test:1");
        final Map<String, Object> constants = Collections.emptyMap();
        final Map<String, Object> specialConstants = Collections.emptyMap();
        final String description = "test description";
View Full Code Here

Examples of com.indeed.proctor.common.model.TestType

        // rule: lang == 'en'
        // rule: ${lang == 'en'}
        final Range range = new Range(0, 1.0d);

        final String version = "100";
        final TestType testType = TestType.ANONYMOUS_USER;
        final String salt = "testsalt";
        final List<TestBucket> buckets = fromCompactBucketFormat("inactive:-1,control:0,test:1");
        final Map<String, Object> constants = Collections.emptyMap();
        final Map<String, Object> specialConstants = Collections.emptyMap();
        final String description = "test description";
View Full Code Here

Examples of com.indeed.proctor.common.model.TestType

        // rule: lang == 'en'
        // rule: ${lang == 'en'}
        final Range range = new Range(0, 1.0d);

        final String version = "100";
        final TestType testType = TestType.ANONYMOUS_USER;
        final String salt = "testsalt";
        final List<TestBucket> buckets = fromCompactBucketFormat("inactive:-1,control:0,test:1");
        final Map<String, Object> constants = Collections.emptyMap();
        final Map<String, Object> specialConstants = Collections.<String, Object>singletonMap("__COUNTRIES", Lists.newArrayList("US", "CA"));
        final String description = "test description";
View Full Code Here

Examples of com.indeed.proctor.common.model.TestType

            assertEquals(TestType.RANDOM, replacement.getTestType());
            assertEquals(1, replacement.getBuckets().size());
            assertEquals(-1, replacement.getBuckets().iterator().next().getValue());
        }

        final TestType unrecognizedTestType = TestType.register("UNRECOGNIZED");
        {
            final TestMatrixArtifact matrix = constructArtifact(tests);

            // verifyAndConsolidate should not throw an error because the 'invalidbuckets' test is not required.
            assertEquals(1, matrix.getTests().size());
View Full Code Here

Examples of com.indeed.proctor.common.model.TestType

        final Map<String, String> versions = Maps.newLinkedHashMap();

        for (final Entry<String, ConsumableTestDefinition> entry : matrix.getTests().entrySet()) {
            final String testName = entry.getKey();
            final ConsumableTestDefinition testDefinition = entry.getValue();
            final TestType testType = testDefinition.getTestType();
            final TestChooser<?> testChooser;
            if (TestType.RANDOM.equals(testType)) {
                testChooser = new RandomTestChooser(expressionFactory, functionMapper, testName, testDefinition);
            } else {
                testChooser = new StandardTestChooser(expressionFactory, functionMapper, testName, testDefinition);
View Full Code Here

Examples of com.indeed.proctor.common.model.TestType

            final String testName = entry.getKey();
            final Integer forceGroupBucket = forceGroups.get(testName);
            final TestChooser<?> testChooser = entry.getValue();
            final String identifier;
            if (testChooser instanceof StandardTestChooser) {
                final TestType testType = testChooser.getTestDefinition().getTestType();
                identifier = identifiers.getIdentifier(testType);
                if (identifier == null) {
                    continue;
                }
            } else {
View Full Code Here

Examples of com.indeed.proctor.common.model.TestType

            @Nonnull final FunctionMapper functionMapper,
            final ProvidedContext providedContext
    ) throws IncompatibleTestMatrixException {
        final List<Allocation> allocations = testDefinition.getAllocations();

        final TestType declaredType = testDefinition.getTestType();
        if (!TestType.all().contains(declaredType)) {
            throw new IncompatibleTestMatrixException(String.format(
                    "Test '%s' is included in the application specification but refers to unknown id type '%s'.",
                    testName, declaredType));
        }
View Full Code Here

Examples of org.apache.beehive.netui.tools.testrecorder.x2004.TestType

            catType = catsType.addNewCategory();
            populateCategory( catType, category );
        }
        TestsType testsType = defs.addNewTests();
        TestDefinition testDef = null;
        TestType testType = null;
        for ( Iterator it = tests.iterator(); it.hasNext(); ) {
            testDef = (TestDefinition) it.next();
            testType = testsType.addNewTest();
            populateTest( testType, testDef );
        }
View Full Code Here

Examples of org.apache.beehive.netui.tools.testrecorder.x2004.TestType

    private static TestDefinitions getTestDefinitionsInstance( TestType[] testTypes, Categories categories,
            Webapps webapps )
            throws ConfigException {
        List list = new ArrayList();
        TestDefinition testDef = null;
        TestType type = null;
        String[] testCategoryStrings = null;
        List testCategories = null;
        WebappConfig webapp = null;
        for ( int i = 0; i < testTypes.length; i++ ) {
            type = testTypes[i];
            if ( type.getCategories() != null ) {
                testCategoryStrings = type.getCategories().getCategoryArray();
                testCategories = getCategories( testCategoryStrings, categories );
            }
            else {
                testCategories = new ArrayList();
            }
            webapp = webapps.getWebapp( type.getWebapp() );
            if ( webapp == null ) {
                ConfigException ce = new ConfigException( "ERROR: unable to find test recorder webapp with name( " +
                        type.getWebapp() +
                        " ) referenced in test definition( " + type.getName() + " )" );
                log.fatal( ce );
                throw ce;
            }
            testDef =
                    new TestDefinition( type.getName().trim(), type.getDescription().trim(), webapp,
                            testCategories );
            categories.addTest( testDef );
            list.add( testDef );
        }
        TestDefinitions defs = new TestDefinitions( list, categories, webapps );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.