codeforequity-at / botium-core

The Selenium for Chatbots - Bots Testing Bots
https://www.botium.ai
MIT License
229 stars 64 forks source link

bot message step getting failed though having expected and actual value are same due to scripting memory #363

Closed radhabasida closed 5 years ago

radhabasida commented 5 years ago

Describe the bug In my botium script, I have bot message like below and I have specified in script file as below

bot

Here's the breakdown of your salary: ▪ Basics - $5,750.00 ▪ House Rent Allowance - $650.00 ▪ Professional Tax - $1,120.00 ▪ Provident Fund - $2,000.00 ▪ Net Salary Payable - $6,520.00

But while executing test script, test case gets failed, due to below error TranscriptError: BotiumError: employee salary conversation flow/Line 98: Expected bot response (on Line 95: #me - Salary Structure BUTTON(Salary Structure)) "Here's the breakdown of your salary: ▪ Basics - $5,750.00 ▪ House Rent Allowance - $650.00 ▪ Professional Tax - $1,120.00 ▪ Provident Fund - $2,000.00 ▪ Net Salary Payable - $6,520.00" to match one of "Here's the breakdown of your salary: ▪ Basics - $650,750.00 ▪ House Rent Allowance - $5.00 ▪ Professional Tax - $1,120.00 ▪ Provident Fund - $2,000.00 ▪ Net Salary Payable - $6,520.00"

To Reproduce Steps to reproduce the behaviour.

Expected behaviour A clear and concise description of what you expected to happen.

Screenshots and Log files verbose log

Botium Flavour:

I think problem is due to scripting memory. Could you please check

ujja commented 5 years ago

Yes, thats right. I create a ticket for it in our backlog.

ujja commented 5 years ago

Could you send your capabilities please? (botium.json)

radhabasida commented 5 years ago

I have done some customisation by adding custom asserters and inputs. Here sending botium.json file having core capabilities of botium

botium.txt

codeforequity-at commented 5 years ago

The reason for this problem is that all the currency dollar signs are intermixing with the scripting memory placeholders. We will have to introduce an escaping mechanism.

radhabasida commented 5 years ago

We can have variable name starting with '' character as there are very rare changes that bot contains any words starting with '' character in bot message.

codeforequity-at commented 5 years ago

The bugfix is to only allow scripting variable names starting with a letter

codeforequity-at commented 5 years ago

fixed with latest build