Code Monkey home page Code Monkey logo

slack-codeception-extension's People

Contributors

alek13 avatar dannylinden avatar max107 avatar mrubiosan avatar ngraf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

slack-codeception-extension's Issues

Different configs for environments

Hello!

Is it possible to use different configs for environments? For example, enable notifications only for specific environment, not for all?

Thanks

Exception in error handler

Hi,
I've just tried the plugin, but I can't get it to work. I'm using codeception 2.3 with visualception module.
When I run my acceptance tests with -vvv I can see the following trace:

Exception trace:
Codeception\Subscriber\ErrorHandler->errorHandler() at /home/fester/PhpstormProjects/razvigor-tests/vendor/ngraf/slack-codeception-extension/src/Extension/SlackExtension.php:258
Codeception\Extension\SlackExtension->sendFailMessage() at /home/fester/PhpstormProjects/razvigor-tests/vendor/ngraf/slack-codeception-extension/src/Extension/SlackExtension.php:216
Codeception\Extension\SlackExtension->sendTestResults() at /home/fester/PhpstormProjects/razvigor-tests/vendor/symfony/event-dispatcher/EventDispatcher.php:212
Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() at /home/fester/PhpstormProjects/razvigor-tests/vendor/symfony/event-dispatcher/EventDispatcher.php:44
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() at /home/fester/PhpstormProjects/razvigor-tests/vendor/codeception/codeception/src/Codeception/Codecept.php:206
Codeception\Codecept->printResult() at /home/fester/PhpstormProjects/razvigor-tests/vendor/codeception/codeception/src/Codeception/Command/Run.php:376
Codeception\Command\Run->execute() at /home/fester/PhpstormProjects/razvigor-tests/vendor/symfony/console/Command/Command.php:252
Symfony\Component\Console\Command\Command->run() at /home/fester/PhpstormProjects/razvigor-tests/vendor/symfony/console/Application.php:865
Symfony\Component\Console\Application->doRunCommand() at /home/fester/PhpstormProjects/razvigor-tests/vendor/symfony/console/Application.php:241
Symfony\Component\Console\Application->doRun() at /home/fester/PhpstormProjects/razvigor-tests/vendor/symfony/console/Application.php:143
Symfony\Component\Console\Application->run() at /home/fester/PhpstormProjects/razvigor-tests/vendor/codeception/codeception/src/Codeception/Application.php:108
Codeception\Application->run() at /home/fester/PhpstormProjects/razvigor-tests/vendor/codeception/codeception/package/bin:37
require() at phar:///usr/local/bin/codecept/autoload.php:12
require_once() at /usr/local/bin/codecept:5

Let me know if I can provide more information.

Fatal error PHPUnit_Framework_TestResult

Hey,

I have gotten following error when I try to use your extension with Codeception ^2.4. Looks like your extension expects to receive an older version of PHPUnit results class.

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Codeception\Extension\SlackExtension::sendSuccessMessage() must be an instance of PHPUnit_Framework_TestResult, instance of PHPUnit\Framework\TestResult given, called in .../vendor/ngraf/slack-codeception-extension/src/Extension/SlackExtension.php on line 206 and defined in .../vendor/ngraf/slack-codeception-extension/src/Extension/SlackExtension.php:226
Stack trace:
#0 .../vendor/ngraf/slack-codeception-extension/src/Extension/SlackExtension.php(206): Codeception\Extension\SlackExtension->sendSuccessMessage(Object(PHPUnit\Framework\TestResult))
#1 .../vendor/symfony/event-dispatcher/EventDispatcher.php(212): Codeception\Extension\SlackExtension->sendTestResults(Object(Codeception\Event\PrintResultEvent), 'result.print.af...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#2 .../vendor/symfony/event-dispatche in .../vendor/ngraf/slack-codeception-extension/src/Extension/SlackExtension.php on line 226

No Slack Notifications

Unfortunately, even with everything correct installed, no notifications were received in slack.

Tested it with setting the extension active via Codeception.yaml and as an alternative, via the command line --ext SlackExtension

I had installed a second extension 'ProgressReporter', just to get sure, everything's on the Codeception side ist fully functional. And Progress Reporter runs just fine...

Verbose output doesn't even mention SlackExtension....

am I missing something?

Here is my Codeception.yaml:

extensions:
    enabled:
        - Codeception\ProgressReporter\ProgressReporter
        - Codeception\Extension\SlackExtension
    config:
        Codeception\Extension\SlackExtension:
            messagePrefix: '*Smoke-Test*'
            webhook: https://hooks.slack.com/services/...
            strategy: always
            extended: true
            extendedMaxLength: 150
            channel: '#channelname'

Package cannot be installed using composer

IIUC, the package needs to be on packagist in order to be able to install it using composer and I think the author is the one that is able to add it there. If that's the case, it would be great if you could do that. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.