org.apache.jmeter.testbeans.TestBean Java Examples

The following examples show how to use org.apache.jmeter.testbeans.TestBean. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractDebugElement.java    From jmeter-debugger with Apache License 2.0 4 votes vote down vote up
protected void prepareBean() {
    if (wrapped instanceof TestBean) {
        //noinspection deprecation
        TestBeanHelper.prepare((TestElement) wrapped); // the deprecation reason is not sufficient
    }
}
 
Example #2
Source File: CassandraTestElementBeanInfoSupport.java    From jmeter-cassandra with Apache License 2.0 4 votes vote down vote up
/**
 *
 */
public CassandraTestElementBeanInfoSupport(Class<? extends TestBean> beanClass) {
    super(beanClass);

    createPropertyGroup("varName", // $NON-NLS-1$
            new String[]{"sessionName" }); // $NON-NLS-1$

    createPropertyGroup("cql", // $NON-NLS-1$
            new String[] {
            "queryType", // $NON-NLS-1$
            "query", // $NON-NLS-1$
            "queryArguments", // $NON-NLS-1$
            "variableNames", // $NON-NLS-1$
            "resultVariable", // $NON-NLS-1$
            "consistencyLevel", // $NON-NLS-1$
            "batchSize" // $NON-NLS-1$
            });

    PropertyDescriptor p = property("sessionName"); // $NON-NLS-1$
    p.setValue(NOT_UNDEFINED, Boolean.TRUE);
    p.setValue(DEFAULT, ""); // $NON-NLS-1$

    p = property("queryArguments"); // $NON-NLS-1$
    p.setValue(NOT_UNDEFINED, Boolean.TRUE);
    p.setValue(DEFAULT, ""); // $NON-NLS-1$

    p = property("variableNames"); // $NON-NLS-1$
    p.setValue(NOT_UNDEFINED, Boolean.TRUE);
    p.setValue(DEFAULT, ""); // $NON-NLS-1$

    p = property("resultVariable"); // $NON-NLS-1$
    p.setValue(NOT_UNDEFINED, Boolean.TRUE);
    p.setValue(DEFAULT, ""); // $NON-NLS-1$

    p = property("batchSize"); // $NON-NLS-1$
    p.setValue(NOT_UNDEFINED, Boolean.TRUE);
    p.setValue(DEFAULT, "");

    p = property("queryType"); // $NON-NLS-1$
    p.setValue(NOT_UNDEFINED, Boolean.TRUE);
    p.setValue(DEFAULT, AbstractCassandaTestElement.SIMPLE);
    p.setValue(NOT_OTHER,Boolean.TRUE);
    p.setValue(TAGS,new String[]{
            AbstractCassandaTestElement.SIMPLE,
            AbstractCassandaTestElement.PREPARED,
            AbstractCassandaTestElement.DYNAMIC_BATCH
            });

    p = property("consistencyLevel"); // $NON-NLS-1$
    p.setValue(NOT_UNDEFINED, Boolean.TRUE);
    p.setValue(DEFAULT, "ONE");
    p.setValue(NOT_OTHER,Boolean.TRUE);
    p.setValue(TAGS,new String[]{
            AbstractCassandaTestElement.ANY,
            AbstractCassandaTestElement.ONE,
            AbstractCassandaTestElement.QUORUM,
            AbstractCassandaTestElement.TWO,
            AbstractCassandaTestElement.THREE,
            AbstractCassandaTestElement.ALL,
            AbstractCassandaTestElement.LOCAL_ONE,
            AbstractCassandaTestElement.LOCAL_QUORUM,
            AbstractCassandaTestElement.EACH_QUORUM
    });

    p = property("query", TypeEditor.TextAreaEditor); // $NON-NLS-1$
    p.setValue(NOT_UNDEFINED, Boolean.TRUE);
    p.setValue(DEFAULT, ""); // $NON-NLS-1$
    p.setValue(TEXT_LANGUAGE, "sql");  // $NON-NLS-1$

}