Package com.qspin.qtaste.testsuite

Examples of com.qspin.qtaste.testsuite.QTasteTestFailException


public class LinuxProcessImpl extends ProcessImpl implements LinuxProcess {

  public LinuxProcessImpl(String pInstanceId) throws QTasteException {
    super(pInstanceId);
    if ( OS.getType() != OS.Type.LINUX )
      throw new QTasteTestFailException("Cannot create a Linux process on a non Linux operating system.");
  }
View Full Code Here


  }

  @Override
  public void killProcessWithSignal(int pSignal) throws QTasteException {
    if (getStatus() != ProcessStatus.RUNNING)
      throw new QTasteTestFailException("Unable to stop a non running process.");
    try
    {
      String command = "kill ";
      if (pSignal > 0)
        command += "-" + pSignal + " ";
      if (getPid() == -1)
        throw new QTasteTestFailException("Cannot kill a process if the pid cannot be found!");
     
      command +=  getPid();
      LOGGER.trace("Kill the process " + getInstanceId() + " with the command : " + command);
      Runtime.getRuntime().exec(command);
      Thread.sleep(10000);
      LOGGER.trace("Process " + getInstanceId() + " status : " + getStatus());
      if ( getStatus() != ProcessStatus.STOPPED )
        throw new QTasteTestFailException("The process " + getInstanceId() + " is still running.");
    }
    catch (IOException pException)
    {
      LOGGER.error("Unable to kill the process " + getInstanceId() + " : " + pException.getMessage(), pException);
    } catch (InterruptedException pException) {
View Full Code Here

            String theTextDB = result.getString("longdescs.thetext");
            logger.info("thetext:" + theTextDB);
            String loginNameDB = result.getString("profiles.login_name");
            logger.info("login_name:" + loginNameDB);
            if (!shortDescDB.equals(shortDescription)) {
                throw new QTasteTestFailException("Expected to get '" + shortDescription + "' as short description but got " + shortDescDB);
            }
            if (!theTextDB.equals(longDescription)) {
                throw new QTasteTestFailException("Expected to get '" + longDescription + "' as long description but got " + theTextDB);
            }
            if (!loginNameDB.equals(assignee)) {
                throw new QTasteTestFailException("Expected to get '" + assignee + "' as assignee but got " + loginNameDB);
            }

        }
        jdbcClient.close();
View Full Code Here

    protected abstract String getExtraDetails();

    public void validate(String failMessagePrefix) throws QTasteTestFailException {
        if (!validate()) {
            throw new QTasteTestFailException(getExceptionMessage(failMessagePrefix));
        }
    }
View Full Code Here

                    return;
                }
                elapsedTime_ms = System.currentTimeMillis() - beginTime_ms;
                long remainingTime_ms = maxTime_ms - elapsedTime_ms;
                if (remainingTime_ms <= 0) {
                    throw new QTasteTestFailException(getExceptionMessage(failMessagePrefix));
                } else {
                    Thread.sleep(Math.min(checkIntervalTime_ms, remainingTime_ms));
                }
            } while (true);
        } catch (InterruptedException ex) {
            throw new QTasteTestFailException("Thread has been interrupted while waiting in validation");
        }
    }
View Full Code Here

      }
    }
   
    if (component == null )
    {
      throw new QTasteTestFailException("The component \"" + componentName + "\" is not found.");
    }
    if (!component.isEnabled()) {
      throw new QTasteTestFailException("The component \"" + componentName + "\" is not enabled.");
    }
    if (! checkComponentIsVisible(component))
      throw new QTasteTestFailException("The component \"" + componentName + "\" is not visible!");
   
    prepareActions();
    SwingUtilities.invokeLater(this);
    return true;
  }
View Full Code Here

    {
      mFoundComponent = mFoundComponents.get(0);
      mFoundComponent.requestFocus();
      return mFoundComponent;
    }
    throw new QTasteTestFailException("The component \"" + name + "\" is not found.");
  }
View Full Code Here

   */
  @Override
  protected void prepareActions() throws QTasteTestFailException {
    mSelectState = Boolean.parseBoolean(mData[2].toString());
    if ( !(component instanceof JCheckBox) && !(component instanceof JRadioButton) ){
      throw new QTasteTestFailException("Unsupported component.");
    }
  }
View Full Code Here

    } else if (component instanceof JSpinner) {
      mValueToSelect = Double.parseDouble(value);
    } else if (component instanceof JSlider) {
      mValueToSelect = Integer.parseInt(value);
    } else {
      throw new QTasteTestFailException("component '" + component.getName() + "' (" + component.getClass() + ") found but unused");
    }
  }
View Full Code Here

              }
              break;
            }
          }
          if (mPath[i] == null) {
            throw new QTasteTestFailException("Unabled to find node named " + nodeNames[i]);
          }
        }
      }
    } else {
      throw new QTasteTestFailException("Unabled to find node named " + nodeNames[0]);
    }
  }
View Full Code Here

TOP

Related Classes of com.qspin.qtaste.testsuite.QTasteTestFailException

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.