Skip to content

Error #43

Closed
Closed

Description

@krishan1kamal

'node_modules' is not recognized as an internal or external command,

Activity

  1. microsoftly commented on Nov 20, 2017

    @microsoftly
    Owner

    Can you give me repro steps?

  2. krishan1kamal commented on Nov 20, 2017

    @krishan1kamal
    Author

    Can you please guide me what file i need to create inside my test directory and how to configure that file inside package.json file script i am new in testing

  3. microsoftly commented on Nov 20, 2017

    @microsoftly
    Owner

    This is a very broad and opinionated question that should be decided by the dev. As long as you install the package with npm install --save bot-tester or yarn add bot-tester you should be good to go. Just import and used as described in the docs. I'd recommend cloning this repo and running the tests yourself to see how to make it work.

    An additional question, what test runner are you using (e.g. mocha + chai, jasmine, etc ...)?

  4. krishan1kamal commented on Nov 20, 2017

    @krishan1kamal
    Author

    Thanks

  5. krishan1kamal commented on Dec 5, 2017

    @krishan1kamal
    Author

    Hi microsoftly i am using mocha + chai

  6. krishan1kamal commented on Dec 5, 2017

    @krishan1kamal
    Author

    AssertionError: expected [ Array(1) ] to include undefined i am getting error please help

    below is my code
    process.env.NODE_ENV = 'development';

    import { BotTester, TestConnector } from 'bot-tester';
    import * as testBot from '../botfactory/server.js'

    const connector = new TestConnector();

    describe('BotTester', () => {
    testBot.start(['vera']);
    let bot = testBot.bots.vera.bot ;
    it('Hi', () => {

        return new BotTester(bot)
             .sendMessageToBot("Hi", "How can I help you. You can say things like : \n\n\- I need to check my leave balance \n\n\- Apply for leave\n\n\ or\n\n- How do I set my goals\n\n- Who can I talk to about performance management")
             .runTest();
    });
    

    it('I need to check my leave balance', () => {
    return new BotTester(bot)
    .sendMessageToBot("I need to check my leave balance","Hello, I'm Vera your virtual HR Helpdesk bot. You can say things like :- I need to check my leave balance - Apply for leave or - How do I set my goals - Who can I talk to about performance management")
    .runTest();
    });

    })

  7. microsoftly commented on Dec 5, 2017

    @microsoftly
    Owner

    Summary: it is failing because you're not sending a response/the response is incorrect.

    Actions you can take to verify: try this in the console or in an emulator and see what happens

    longer answer:
    This means that your bot is not handling the input correctly. You have sent it the message Hi and it is expecting How can I help you. You can say things like : \n\n\- I need to check my leave balance \n\n\- Apply for leave\n\n\ or\n\n- How do I set my goals\n\n- Who can I talk to about performance management as a response.

    Instead you did not send a response or the response you have sent is empty (that's why its undefined).

    I cannot give you any further input without knowing the code driving your bot.

    For future submissions, please apply formatting for ease of reading and understanding.

  8. krishan1kamal commented on Dec 6, 2017

    @krishan1kamal
    Author

    Hi @microsoftly Thanks for your support
    I am getting adaptive card response in json how can i check that this is correct response or not please help

    ..[application/vnd.microsoft.card.adaptive].................
    {"$schema":"http://adaptivecards.io/schemas/adaptive-card.json","type":"AdaptiveCard","body":[{"type":"TextBlock","text":"Sure, I can help you with that. Let me ask
    few quick questions to help you with that.","weight":"bolder","size":"medium","isSubtle":true,"color":"default","horizontalAlignment":"default","wrap":true},{"type":
    "TextBlock","text":"Enter Full Name","weight":"bolder","size":"medium","isSubtle":true,"color":"default","horizontalAlignment":"default","wrap":true},{"type":"Input.
    Text","id":"name","isRequired":true,"placeholder":"full name"},{"type":"TextBlock","text":"Enter EmployeeId","weight":"bolder","size":"medium","isSubtle":true,"color
    ":"default","horizontalAlignment":"default","wrap":true},{"type":"Input.Text","id":"employeeId","isRequired":true,"placeholder":"employee Id"}],"actions":[{"type":"A
    ction.Submit","title":"Submit"}]}

  9. microsoftly commented on Dec 6, 2017

    @microsoftly
    Owner

    At the moment, there is not adaptive card support. I will be working on it soon.

  10. microsoftly commented on Dec 7, 2017

    @microsoftly
    Owner

    @krishan1kamal Adaptive card support has been added.

    #45

  11. krishan1kamal commented on Dec 7, 2017

    @krishan1kamal
    Author

    Hi @microsoftly thanks for your support
    how can i pass multiple adaptive card json? please help

  12. microsoftly commented on Dec 7, 2017

    @microsoftly
    Owner

    I do not understand the question. Please refer to the existing tests as reference

  13. krishan1kamal commented on Dec 8, 2017

    @krishan1kamal
    Author

    I am getting error please help
    Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

  14. microsoftly commented on Dec 8, 2017

    @microsoftly
    Owner

    The error is telling you exactly what is happening. The test is timing out. You're either not returning a promise, not calling done, or your expected response is never returned

  15. krishan1kamal commented on Dec 8, 2017

    @krishan1kamal
    Author

    Hi @microsoftly its mocha timeout i have done with it thanks for your support
    how can i pass multiple adaptive card json? please help
    I have a multiple adaptive card in chat bot if i put one adaptive card value other adaptive card is appear i want to validate all adaptive card

    and one more thing i want to know from you how i pass value of adaptive card field as a message
    please help

  16. krishan1kamal commented on Dec 12, 2017

    @krishan1kamal
    Author

    Hi @microsoftly i have done with all question thanks for your support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions