Testing

To test your Chatbot use Test class.

Example :

BotWithPatterns testing :



    require_once __DIR__ . '/vendor/autoload.php';

    use Chatman\Support\Test;

    echo Test::BotWithPatterns("new.php", "chatbot-py.json");
  
        
      

BotWithoutPatterns testing :



    require_once __DIR__ . '/vendor/autoload.php';

    use Chatman\Support\Test;

    echo Test::BotWithoutPatterns("new.php", "chatbot-py.json");
      
            
          

These methods accept two arguments.

1 - PHP file location where you are writing this code.
2 - JSON dataset file location.

Now you will see this user-interface in your browser. You can test your chatbot without refreshing the page again and again.