diff --git a/lib/tests/behat/behat_local.php b/lib/tests/behat/behat_local.php
new file mode 100644
index 0000000..a8a1b10
--- /dev/null
+++ b/lib/tests/behat/behat_local.php
@@ -0,0 +1,65 @@
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Files interactions with behat.
+ *
+ * Note that steps definitions files can not extend other steps definitions files, so
+ * steps definitions which makes use of file attachments or filepicker should
+ * extend behat_files instead of behat_base.
+ *
+ * @package    core
+ * @category   test
+ * @copyright  2013 David Monllaó
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php.
+
+require_once(__DIR__ . '/../../behat/behat_base.php');
+
+use Behat\Mink\Exception\ExpectationException as ExpectationException,
+    Behat\Mink\Element\NodeElement as NodeElement;
+
+class behat_local extends behat_base {
+
+    /**
+     * Sets the specified value to the field.
+     *
+     * @Given /^I go home$/
+     * @throws ElementNotFoundException Thrown by behat_base::find
+     * @param string $url
+     * @return void
+     */
+    public function i_go_home() {
+        $session = $this->getSession();
+        $session->visit($this->locate_path('/?redirect=0'));
+        #$session->visit('https://ef6aa769.ngrok.io/new_development/?redirect=0');
+    }
+    /**
+     * Sets the specified value to the field.
+     *
+     * @Given /^I go to url "(?P<url_string>(?:[^"]|\\")*)"$/
+     * @throws ElementNotFoundException Thrown by behat_base::find
+     * @param string $url
+     * @return void
+     */
+    public function i_go_to_url($url) {
+        $session = $this->getSession();
+        $session->visit($url);
+    }
+
+}
diff --git a/lib/tests/behat/lticertification.feature b/lib/tests/behat/lticertification.feature
new file mode 100644
index 0000000..fe1b8f5
--- /dev/null
+++ b/lib/tests/behat/lticertification.feature
@@ -0,0 +1,91 @@
+@local @lti_cert
+Feature: IMS LTI Certification
+  In order to make moodle awesome
+  As a developer
+  I need to be able to get behat to do all my hard work
+
+  Background:
+    Given the following "users" exist:
+      | username | firstname | lastname | email                |
+      | teacher1 | Terry1    | Teacher1 | teacher1@example.com |
+    And the following "courses" exist:
+      | fullname | shortname | category |
+      | Course 1 | C1 | 0 |
+    And the following "course enrolments" exist:
+      | user | course | role |
+      | teacher1 | C1 | editingteacher |
+
+  @javascript
+  Scenario: Go to the certification site
+    Given I go to url "https://www.imsglobal.org/lti/cert/index.php"
+    And I press "Process for Tool Consumers"
+    And I set the field "Username" to "INSERTREALIMSUSERNAME"
+    And I set the field "Password" to "INSERTREALPASSWORD"
+    And I press "Log in"
+    And I go to url "https://www.imsglobal.org/lti/cert/index.php"
+    And I press "Go to Configuration »"
+    And I set the field "name" to "Moodle"
+    And I set the field "version" to "3.2"
+    And I press "Save settings"
+    And I press "Go to Results »"
+    When I log in as "admin"
+    And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool"
+    And I follow "Manage preconfigured tools"
+    And I follow "Add preconfigured tool"
+    And I set the following fields to these values:
+      | Tool name     | IMS LTI Certification Type |
+      | Tool URL | https://www.imsglobal.org/lti/cert/tc_tool.php?x=With%20Space&y=yes |
+      | Consumer key  | spRJ0b9GhHSiKf9 |
+      | Shared secret | secret570c97842cdbb |
+      | Show tool type when creating tool instances | 1 |
+    And I set the field "Custom parameters" to multiline
+    """
+    simple_key=custom_simple_value
+    Complex!@#$^*(){}[]KEY=Complex!@#$^*;(){}[]½Value
+    cert_userid=$User.id
+    cert_username=$User.username
+    tc_profile_url=$ToolConsumerProfile.url
+    """
+    And I pause
+    # Use proper key and secret
+    And I press "Save changes"
+    And I am on site homepage
+    And I follow "Course 1"
+    And I turn editing mode on
+    And I add a "External tool" to section "1" and I fill the form with:
+      | Activity name | Test tool activity 1 |
+      | External tool type | IMS LTI Certification Type |
+    And I follow "Test tool activity 1"
+    And I switch to "contentframe" iframe
+    And I should see "Failed: 0"
+    And I follow "Course 1"
+    And I open "Test tool activity 1" actions menu
+    And I follow "Edit settings" in the open menu
+    And I set the field "Share launcher's name with the tool" to "0"
+    And I set the field "Share launcher's email with the tool" to "0"
+    And I set the field "Accept grades from the tool" to "0"
+    And I follow "Test tool activity 1"
+    And I switch to "contentframe" iframe
+    And I should see "Failed: 0"
+    Then I go to url "https://www.imsglobal.org/lti/cert/index.php"
+    And I pause
+    And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool"
+    And I follow "Manage external tool registrations"
+    And I follow "Configure a new external tool registration"
+    And I set the following fields to these values:
+      | Tool provider name | IMS LTI Certification Registration |
+      | Registration URL   | https://www.imsglobal.org/lti/cert/tc_tool.php |
+      | Capabilities | basic-lti-launch-request,Context.id,CourseSection.label,CourseSection.longDescription,CourseSection.sourcedId,CourseSection.timeFrame.begin,CourseSection.title,Membership.role,Person.address.country,Person.address.locality,Person.address.street1,Person.address.timezone,Person.email.primary,Person.name.family,Person.name.full,Person.name.given,Person.name.middle,Person.phone.mobile,Person.phone.primary,Person.sourcedId,Person.webaddress,ResourceLink.description,ResourceLink.id,ResourceLink.title,Result.autocreate,Result.sourcedId,User.id,User.username |
+      | Services     | Memberships,Tool Consumer Profile,Tool Proxy,Tool Settings |
+    And I press "Save changes"
+    And I follow "Register"
+    And I switch to "contentframe" iframe
+    And I pause
+    And I should see "Failed: 0"
+    And I go to url "https://www.imsglobal.org/lti/cert/index.php"
+    And I press "Run test"
+    And I should see "Failed: 0"
+    #And I click on "" "css_element"
+    And I pause
+    #Click second run tests
+    And I go home
