Index: src/testing/webserverprocess.h
===================================================================
--- src/testing/webserverprocess.h	(revision 915dc1852a6aa7d67755cb64c0cff72edbe7dd4c)
+++ src/testing/webserverprocess.h	(revision 363c1af60970156e9a62ba6bfdc0ab5874611dc0)
@@ -21,8 +21,6 @@
 #define WEBSERVERPROCESS_H
 
-#include <QThread>
+#include <QObject>
 #include <sitestingglobal.h>
-
-class WebserverRunner;
 
 #include <QPointer>
@@ -32,7 +30,5 @@
  * @brief Starts the php build in webserver to allow testing against the webservice
  */
-class SI_TESTING_EXPORT WebserverProcess : public QThread {
-	friend WebserverRunner;
-	
+class SI_TESTING_EXPORT WebserverProcess : public QObject {
 	Q_OBJECT
 	public:
@@ -44,20 +40,28 @@
 		
 		bool isRunning() const;
-	
-		void stopThread();
-		void run();
-		bool isStarted();
-		bool waitForStart();
+		bool start();
+		/**
+		 * @brief Stops the webservice with QProcess::terminate(). The destructor ~WebserverProcess() calls QProcess::kill() to stop the webserver process.
+		 */
+		bool stop();
+		/**
+		 * @brief Calls the setup page of the webservice. Returns true, if the call was successfully. This does not means, the setup was successfully.
+		 */
+		bool setup();
+		/**
+		 * @brief Removes the webservice data directory to cleanup test case. It is called by ~WebserverProcess().
+		 */
+		bool cleanupDataDirectory();
 
 	private slots:
-		void setStarted();
+		void processError(QProcess::ProcessError error);
+		void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
+		void processReadyRead();
 
 	private:
 		static QString appendSlashToUrl(QString url);
 
-// 		QPointer<QProcess> _webserverProcess;
-// 		int _timeout;
-		WebserverRunner *_runner;
-		bool _finishedStartup;
+		QPointer<QProcess> _process;
+		int _timeout;
 };
 
