Package oracletestapplication.tests

Examples of oracletestapplication.tests.TestSuite


    tableData.horizontalAlignment = GridData.FILL;
    tableData.verticalAlignment = GridData.FILL;
    tableData.grabExcessHorizontalSpace = true;
    tableData.grabExcessVerticalSpace = true;
    table.getTable().setLayoutData(tableData);
    table.setInput(new TestSuite());

    Group group = new Group(composite, SWT.NONE);
    group.setText("�j teszteset hozz�ad�sa");
    group.setLayout(new GridLayout(6, false));
    GridData groupData = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
    group.setLayoutData(groupData);

    testCombo = new Combo(group, SWT.READ_ONLY);

    for (TestStatement testStatement : statements) {
      testCombo.add(testStatement.getName());
    }

    Label label = new Label(group, SWT.NONE);
    label.setText("Sz�lak sz�ma:");

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

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

    Button addButton = new Button(group, SWT.PUSH);
    addButton.setText("Hozz�ad");
    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();
      }
    });

    Button executeButton = new Button(group, SWT.PUSH);
    executeButton.setText("V�grehajt");
    executeButton.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        FileLogWriter writer = new FileLogWriter("D:\\valami.txt");
        TestSuite testSuite = (TestSuite) table.getInput();
        TestService.executeTestSuite(testSuite, writer);
        writer.close();
      }
    });
  }
View Full Code Here


public class TestSuiteContentProvider implements IStructuredContentProvider {

  @Override
  public Object[] getElements(Object inputElement) {
    if (inputElement instanceof TestSuite) {
      TestSuite testSuite = (TestSuite) inputElement;
      return testSuite.getTestCases().toArray();
    }

    return null;
  }
View Full Code Here

    tableData.horizontalAlignment = GridData.FILL;
    tableData.verticalAlignment = GridData.FILL;
    tableData.grabExcessHorizontalSpace = true;
    tableData.grabExcessVerticalSpace = true;
    table.getTable().setLayoutData(tableData);
    table.setInput(new TestSuite());

    Group group = new Group(composite, SWT.NONE);
    group.setText("�j teszteset hozz�ad�sa");
    group.setLayout(new GridLayout(6, false));
    GridData groupData = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
    group.setLayoutData(groupData);

    testCombo = new Combo(group, SWT.READ_ONLY);

    for (TestStatement testStatement : statements) {
      testCombo.add(testStatement.getName());
    }

    Label label = new Label(group, SWT.NONE);
    label.setText("Sz�lak sz�ma:");

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

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

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

    Button addButton = new Button(group, SWT.PUSH);
    addButton.setText("Hozz�ad");
    addButton.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);

        ((TestSuite) table.getInput()).addTestCase(testCase);
        table.refresh();
      }
    });

    Button executeButton = new Button(group, SWT.PUSH);
    executeButton.setText("V�grehajt");
    executeButton.addSelectionListener(new SelectionAdapter() {

      @Override
      public void widgetSelected(SelectionEvent e) {
        FileLogWriter writer = new FileLogWriter("D:\\valami.txt");
        TestSuite testSuite = (TestSuite) table.getInput();
        TestService.executeTestSuite(testSuite, writer);
        writer.close();
      }
    });
  }
View Full Code Here

TOP

Related Classes of oracletestapplication.tests.TestSuite

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.