/** * Append a single VM option. */ @Override public ReproduceErrorMessageBuilder appendOpt(String sysPropName, String value) { if (sysPropName.equals(SYSPROP_ITERATIONS())) { // we don't want the iters to be in there! return this; } if (sysPropName.equals(SYSPROP_TESTMETHOD())) { //don't print out the test method, we print it ourselves in appendAllOpts //without filtering out the parameters (needed for REST tests) return this; } if (sysPropName.equals(SYSPROP_PREFIX())) { // we always use the default prefix return this; } if (!Strings.isBlank(value)) { if (value.indexOf(' ') >= 0) { return super.appendOpt(sysPropName, '"' + value + '"'); } return super.appendOpt(sysPropName, value); } return this; }
@Override public ReproduceErrorMessageBuilder appendAllOpts(Description description) { super.appendAllOpts(description); if (description.getMethodName() != null) { //prints out the raw method description instead of methodName(description) which filters out the parameters super.appendOpt(SYSPROP_TESTMETHOD(), "\"" + description.getMethodName() + "\""); } List<String> properties = new ArrayList<>(); scanProperties(description.getTestClass(), properties); appendProperties(properties.toArray(new String[properties.size()])); return appendESProperties(); }
/** * Append a single VM option. */ @Override public ReproduceErrorMessageBuilder appendOpt(String sysPropName, String value) { if (sysPropName.equals(SYSPROP_ITERATIONS())) { // we don't want the iters to be in there! return this; } if (sysPropName.equals(SYSPROP_TESTMETHOD())) { //don't print out the test method, we print it ourselves in appendAllOpts //without filtering out the parameters (needed for REST tests) return this; } if (sysPropName.equals(SYSPROP_PREFIX())) { // we always use the default prefix return this; } if (Strings.hasLength(value)) { return super.appendOpt(sysPropName, value); } return this; }
/** * Append a single VM option. */ @Override public ReproduceErrorMessageBuilder appendOpt(String sysPropName, String value) { if (sysPropName.equals(SYSPROP_ITERATIONS())) { // we don't want the iters to be in there! return this; } if (sysPropName.equals(SYSPROP_TESTMETHOD())) { //don't print out the test method, we print it ourselves in appendAllOpts //without filtering out the parameters (needed for REST tests) return this; } if (sysPropName.equals(SYSPROP_PREFIX())) { // we always use the default prefix return this; } if (!Strings.isBlank(value)) { if (value.indexOf(' ') >= 0) { return super.appendOpt(sysPropName, '"' + value + '"'); } return super.appendOpt(sysPropName, value); } return this; }
@Override public ReproduceErrorMessageBuilder appendAllOpts(Description description) { super.appendAllOpts(description); if (description.getMethodName() != null) { //prints out the raw method description instead of methodName(description) which filters out the parameters super.appendOpt(SYSPROP_TESTMETHOD(), "\"" + description.getMethodName() + "\""); } List<String> properties = new ArrayList<>(); scanProperties(description.getTestClass(), properties); appendProperties(properties.toArray(new String[properties.size()])); return appendESProperties(); }
@Override public ReproduceErrorMessageBuilder appendAllOpts(Description description) { super.appendAllOpts(description); if (description.getMethodName() != null) { //prints out the raw method description instead of methodName(description) which filters out the parameters super.appendOpt(SYSPROP_TESTMETHOD(), "\"" + description.getMethodName() + "\""); } return appendESProperties(); }
if (emptyToNull(System.getProperty(SYSPROP_TESTMETHOD())) != null) { filter(new MethodGlobFilter(System.getProperty(SYSPROP_TESTMETHOD())));
if (emptyToNull(System.getProperty(SYSPROP_TESTMETHOD())) != null) { filter(new MethodGlobFilter(System.getProperty(SYSPROP_TESTMETHOD())));
String testMethodFilter = Strings.emptyToNull(getProject().getProperty(SYSPROP_TESTMETHOD())); if (testMethodFilter != null) { Environment.Variable v = new Environment.Variable(); v.setKey(SYSPROP_TESTMETHOD()); v.setValue(testMethodFilter); getCommandline().addSysproperty(v);
/** * Append all JVM options that may help in reproducing the error. Options are * appended to the provided StringBuilder in the "command-line" syntax of: * <pre> * -Doption="value" * </pre> * * @param description Suite or test description. */ public ReproduceErrorMessageBuilder appendAllOpts(Description description) { RandomizedContext ctx = null; try { ctx = RandomizedContext.current(); appendOpt(SYSPROP_RANDOM_SEED(), ctx.getRunnerSeedAsString()); } catch (IllegalStateException e) { logger.warning("No context available when dumping reproduce options?"); } if (description.getClassName() != null) { appendOpt(SYSPROP_TESTCLASS(), description.getClassName()); } if (description.getMethodName() != null) { appendOpt(SYSPROP_TESTMETHOD(), methodName(description)); } appendRunnerProperties(); appendTestGroupOptions(ctx); appendEnvironmentSettings(); return this; }
/** * Append all JVM options that may help in reproducing the error. Options are * appended to the provided StringBuilder in the "command-line" syntax of: * <pre> * -Doption="value" * </pre> * * @param description Suite or test description. */ public ReproduceErrorMessageBuilder appendAllOpts(Description description) { RandomizedContext ctx = null; try { ctx = RandomizedContext.current(); appendOpt(SYSPROP_RANDOM_SEED(), ctx.getRunnerSeedAsString()); } catch (IllegalStateException e) { logger.warning("No context available when dumping reproduce options?"); } if (description.getClassName() != null) { appendOpt(SYSPROP_TESTCLASS(), description.getClassName()); } if (description.getMethodName() != null) { appendOpt(SYSPROP_TESTMETHOD(), methodName(description)); } appendRunnerProperties(); appendTestGroupOptions(ctx); appendEnvironmentSettings(); return this; }
String methodFilterGlob = Strings.emptyToNull(System.getProperty(SysGlobals.SYSPROP_TESTMETHOD())); Filter methodFilter = Filter.ALL; if (methodFilterGlob != null) {