diff --git a/core/modules/simpletest/simpletest.routing.yml b/core/modules/simpletest/simpletest.routing.yml
index 43016b2..9c890ee 100644
--- a/core/modules/simpletest/simpletest.routing.yml
+++ b/core/modules/simpletest/simpletest.routing.yml
@@ -21,3 +21,13 @@ simpletest.result_form:
     _title: 'Test result'
   requirements:
     _permission: 'administer unit tests'
+
+simpletest.command_page:
+  path: '/admin/config/development/testing/command/{test_classes_simpletest}/{test_classes_phpunit}'
+  defaults:
+    _controller: 'Drupal\simpletest\Controller\CommandRunController::showCommand'
+    _title: 'Test result'
+    test_classes_phpunit: ""
+    test_classes_simpletest: ""
+  requirements:
+    _permission: 'administer unit tests'
diff --git a/core/modules/simpletest/src/Controller/CommandRunController.php b/core/modules/simpletest/src/Controller/CommandRunController.php
new file mode 100644
index 0000000..2ec868e
--- /dev/null
+++ b/core/modules/simpletest/src/Controller/CommandRunController.php
@@ -0,0 +1,54 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\simpletest\Controller\CommandRunController.
+ */
+
+namespace Drupal\simpletest\Controller;
+
+use Drupal\Core\Controller\ControllerBase;
+
+class CommandRunController extends ControllerBase {
+
+  public function showCommand($test_classes_simpletest, $test_classes_phpunit) {
+    $test_classes = explode(',', $test_classes_simpletest);
+
+    /** @var \Drupal\Core\Routing\RequestContext $request_context */
+    $request_context = \Drupal::service('router.request_context');
+    $url = $request_context->getCompleteBaseUrl();
+
+    $commands = [];
+    foreach ($test_classes as $test_class) {
+      $commands[] = "core/scripts/run-tests.sh --browser --verbose --url $url " . implode(',', $test_classes);
+    }
+
+    $result[] = [
+      '#prefix' => '<pre><code>',
+      '#type' => 'inline_template',
+      '#template' => '{{ items | safe_join(separator) }}',
+      '#context' => ['separator' => "\n", 'items' => $commands],
+      '#suffix' => '</code></pre>',
+    ];
+
+   $test_classes = array_filter(explode(', ', $test_classes_phpunit));
+
+   $commands = [];
+   foreach ($test_classes as $test_class) {
+     $reflection_class = new \ReflectionClass($test_class);
+     $filename = str_replace(\Drupal::root() .'/', '', $reflection_class->getFileName());
+     $commands[] = "core/vendor/bin/phpunit -c core $filename";
+   }
+
+   $result[] = [
+     '#prefix' => '<pre><code>',
+     '#type' => 'inline_template',
+     '#template' => '{{ items | safe_join(separator) }}',
+     '#context' => ['separator' => "\n", 'items' => $commands],
+     '#suffix' => '</code></pre>',
+   ];
+
+   return $result;
+  }
+
+}
diff --git a/core/modules/simpletest/src/Form/SimpletestTestForm.php b/core/modules/simpletest/src/Form/SimpletestTestForm.php
index f63e8be..a3b961b 100644
--- a/core/modules/simpletest/src/Form/SimpletestTestForm.php
+++ b/core/modules/simpletest/src/Form/SimpletestTestForm.php
@@ -51,10 +51,22 @@ public function getFormId() {
     return 'simpletest_test_form';
   }
 
+  protected function buildCommandLine(array $tests_list) {
+    print_r($tests_list);
+  }
+
   /**
    * {@inheritdoc}
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
+    if ($tests_list = $form_state->get('tests_list')) {
+      $form['command_line'] = [
+        '#prefix' => '<pre><code>',
+        '#markup' => $this->buildCommandLine($tests_list),
+        '#suffix' => '</code></pre>',
+      ];
+      return $form;
+    }
     $form['actions'] = array('#type' => 'actions');
     $form['actions']['submit'] = array(
       '#type' => 'submit',
@@ -223,7 +235,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
       $form_state->setValue('tests', $user_input['tests']);
     }
 
-    $tests_list = array();
+    $tests_list = array('simpletest' => [], 'phpunit' => []);
     foreach ($form_state->getValue('tests') as $class_name => $value) {
       if ($value === $class_name) {
         if (is_subclass_of($class_name, 'PHPUnit_Framework_TestCase')) {
@@ -236,12 +248,10 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
       }
     }
     if (!empty($tests_list)) {
-      putenv('SIMPLETEST_BASE_URL=' . $base_url);
-      $test_id = simpletest_run_tests($tests_list, 'drupal');
-      $form_state->setRedirect(
-        'simpletest.result_form',
-        array('test_id' => $test_id)
-      );
+      $form_state->setRedirect('simpletest.command_page', [
+        'test_classes_simpletest' => implode(',', $tests_list['simpletest']),
+        'test_classes_phpunit' => implode(',', $tests_list['phpunit']),
+      ]);
     }
   }
 
