Package oracletestapplication.tests.teststatement

Examples of oracletestapplication.tests.teststatement.TestStatement


    addButton.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        int numThreads = Integer.parseInt(threadSpinner.getText());
        TestStatement statement = getStatementByName(testCombo.getText());

        TestCase testCase = new TestCase(connectionData, statement, numThreads, 1);

        ((TestSuite) table.getInput()).addTestCase(testCase);
        table.refresh();
View Full Code Here


      }
    });
  }

  protected TestStatement getStatementByName(String statementName) {
    TestStatement statement = null;
    for (TestStatement stmnt : statements) {
      if (stmnt.getName().equals(statementName)) {
        statement = stmnt;
      }
    }
View Full Code Here

    testCombo.addModifyListener(new ModifyListener() {

      @Override
      public void modifyText(ModifyEvent arg0) {
        String statementName = testCombo.getText();
        TestStatement statement = getStatementByName(statementName);
        sqlText.setText(statement.getStatement());
        descriptionText.setText(statement.getDescription());
      }
    });

    sqlText = new Text(composite, SWT.MULTI | SWT.BORDER);
    GridData textData = new GridData();
    textData.grabExcessHorizontalSpace = true;
    textData.horizontalAlignment = GridData.FILL;
    textData.horizontalSpan = 3;
    textData.heightHint = 100;
    sqlText.setLayoutData(textData);

    descriptionText = new Text(composite, SWT.MULTI | SWT.BORDER);
    descriptionText.setLayoutData(textData);

    testCombo.select(0);

    Group executionGroup = new Group(composite, SWT.NONE);
    executionGroup.setLayout(new GridLayout(5, false));
    GridData groupData = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
    groupData.horizontalSpan = 3;
    executionGroup.setLayoutData(groupData);

    Button executeButton = new Button(executionGroup, SWT.PUSH);
    executeButton.setText("Teszt v�grehajt�sa");
    executeButton.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        int numThreads = Integer.parseInt(threadSpinner.getText());
        TestStatement statement = getStatementByName(testCombo.getText());

        TestCase testCase = new TestCase(connectionData, statement, numThreads, 1);
        long duration = TestService.executeTestCase(testCase);
        timeText.setText(String.valueOf(duration) + "ms");
      }
    });

    label = new Label(executionGroup, SWT.NONE);
    label.setText("Threadek sz�ma: ");

    threadSpinner = new Spinner(executionGroup, SWT.NONE);
    threadSpinner.setMinimum(1);
    threadSpinner.setMaximum(100);

    GridData gridData = new GridData();
    gridData.horizontalSpan = 3;
    threadSpinner.setLayoutData(gridData);

    label = new Label(executionGroup, SWT.NONE);
    label.setText("V�grehajt�si id�: ");

    timeText = new Text(executionGroup, SWT.SINGLE | SWT.BORDER);
    GridData timeTextData = new GridData();
    timeTextData.horizontalSpan = 2;
    timeTextData.widthHint = 100;
    timeText.setLayoutData(timeTextData);
    timeText.setEnabled(false);

    Button openTestSuiteDialog = new Button(executionGroup, SWT.PUSH);
    openTestSuiteDialog.setText("Automatikus tesztek be�ll�t�sa");
    openTestSuiteDialog.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        // TestSuiteDialog2 dialog = new
        // TestSuiteDialog2(Display.getDefault().getActiveShell(),
        // connectionData);
        //       
        // dialog.open();
        TestSuiteDialog dialog = new TestSuiteDialog(Display.getDefault().getActiveShell(), connectionData,
            statements);
        dialog.open();
      }
    });

    Button planButton = new Button(composite, SWT.PUSH);
    GridData planData = new GridData();
    planData.horizontalSpan = 3;
    planButton.setText("Execution plan");
    planButton.setLayoutData(planData);
    planButton.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        TestStatement statement = getStatementByName(testCombo.getText());
        ArrayList<ExecutionPlanRow> plan = DatabaseService.getExecutionPlan(connectionData, statement
            .getStatement());
        planTable.setInput(plan);
      }
    });
View Full Code Here

    });

  }

  protected TestStatement getStatementByName(String statementName) {
    TestStatement statement = null;
    for (TestStatement stmnt : statements) {
      if (stmnt.getName().equals(statementName)) {
        statement = stmnt;
      }
    }
View Full Code Here

    testCombo.addModifyListener(new ModifyListener() {

      @Override
      public void modifyText(ModifyEvent arg0) {
        String statementName = testCombo.getText();
        TestStatement statement = getStatementByName(statementName);
        sqlText.setText(statement.getStatement());

      }
    });

    sqlText = new Text(composite, SWT.MULTI | SWT.BORDER);
    GridData textData = new GridData();
    textData.grabExcessHorizontalSpace = true;
    textData.horizontalAlignment = GridData.FILL;
    textData.horizontalSpan = 3;
    textData.heightHint = 200;
    sqlText.setLayoutData(textData);

    testCombo.select(0);

    Group executionGroup = new Group(composite, SWT.NONE);
    executionGroup.setLayout(new GridLayout(5, false));
    GridData groupData = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
    groupData.horizontalSpan = 3;
    executionGroup.setLayoutData(groupData);

    Button executeButton = new Button(executionGroup, SWT.PUSH);
    executeButton.setText("Teszt v�grehajt�sa");
    executeButton.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        int numThreads = Integer.parseInt(threadSpinner.getText());
        int numExecutions = Integer.parseInt(numExecSpinner.getText());
        TestStatement statement = getStatementByName(testCombo.getText());

        TestCase testCase = new TestCase(connectionData, statement, numThreads, numExecutions);
        long duration = TestService.executeTestCase(testCase);
        timeText.setText(String.valueOf(duration) + "ms");
      }
    });

    label = new Label(executionGroup, SWT.NONE);
    label.setText("Threadek sz�ma: ");

    threadSpinner = new Spinner(executionGroup, SWT.NONE);
    threadSpinner.setMinimum(1);
    threadSpinner.setMaximum(100);

    label = new Label(executionGroup, SWT.NONE);
    label.setText("V�grehajt�sok sz�ma: ");

    numExecSpinner = new Spinner(executionGroup, SWT.NONE);
    numExecSpinner.setMinimum(1);
    numExecSpinner.setMaximum(10);

    label = new Label(executionGroup, SWT.NONE);
    label.setText("V�grehajt�si id�: ");

    timeText = new Text(executionGroup, SWT.SINGLE | SWT.BORDER);
    GridData timeTextData = new GridData();
    timeTextData.horizontalSpan = 2;
    timeTextData.widthHint = 100;
    timeText.setLayoutData(timeTextData);
    timeText.setEnabled(false);

    Button openTestSuiteDialog = new Button(executionGroup, SWT.PUSH);
    openTestSuiteDialog.setText("Automatikus tesztek be�ll�t�sa");
    openTestSuiteDialog.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        // TestSuiteDialog2 dialog = new
        // TestSuiteDialog2(Display.getDefault().getActiveShell(),
        // connectionData);
        //       
        // dialog.open();
        TestSuiteDialog dialog = new TestSuiteDialog(Display.getDefault().getActiveShell(), connectionData,
            statements);
        dialog.open();
      }
    });

    Button planButton = new Button(composite, SWT.PUSH);
    GridData planData = new GridData();
    planData.horizontalSpan = 3;
    planButton.setText("Execution plan");
    planButton.setLayoutData(planData);
    planButton.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        TestStatement statement = getStatementByName(testCombo.getText());
        ArrayList<ExecutionPlanRow> plan = DatabaseService.getExecutionPlan(connectionData, statement
            .getStatement());
        planTable.setInput(plan);
      }
    });
View Full Code Here

    });

  }

  protected TestStatement getStatementByName(String statementName) {
    TestStatement statement = null;
    for (TestStatement stmnt : statements) {
      if (stmnt.getName().equals(statementName)) {
        statement = stmnt;
      }
    }
View Full Code Here

      @Override
      public void widgetSelected(SelectionEvent e) {
        int numThreads = Integer.parseInt(threadSpinner.getText());
        int numExecutions = Integer.parseInt(numExecSpinner.getText());
        TestStatement statement = getStatementByName(testCombo.getText());

        TestCase testCase = new TestCase(connectionData, statement, numThreads, numExecutions);

        ((TestSuite) table.getInput()).addTestCase(testCase);
        table.refresh();
View Full Code Here

      }
    });
  }

  protected TestStatement getStatementByName(String statementName) {
    TestStatement statement = null;
    for (TestStatement stmnt : statements) {
      if (stmnt.getName().equals(statementName)) {
        statement = stmnt;
      }
    }
View Full Code Here

TOP

Related Classes of oracletestapplication.tests.teststatement.TestStatement

Copyright © 2018 www.massapicom. 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.