I am using botium-cli 0.0.40 and I have the following convo file (AGE.convo.txt):
#me
what is your age?
#bot
AGEA_UTT
There is also a utterance file (AGEA_UTT.utterances.txt):
AGEA_UTT
['I am $months months old.']
['I am $years years old.']
['I am 5 years old.']
For an answer: ['I am 5 years old.'] it passes. But for ['I am 6 years old.'] it fails:
TranscriptError: Error: convos/AGE.convo.txt: Expected bot response
(on Line 4: #me - what is your age? ) "['I am 6 years old.']" to
match one of "['I am $months months old.'],['I am $years years
old.'],['I am 5 years old.']"
Is it a bug? Do I have to change any Botium settings? The wiki doesn't mention any need for that: https://github.com/codeforequity-at/botium-core/wiki/Botium-Scripting#scripting-memory
Thanks in advance.
You have to set the SCRIPTING_ENABLE_MEMORY capability to true to enable the memory.
Attention: the build you mentioned doesn't yet allow scripting memory expressions in utterances! This is part of the next build scheduled for upcoming Monday!
Related
This question already has answers here:
org.openqa.selenium.remote.service.DriverService$Builder.createArgs()Lcom/google/common/collect/ImmutableList; with Selenium 3.5.3 Chrome 76
(4 answers)
Incompatible library version selenium / guava
(1 answer)
java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;I)V with IE and Selenium through Java
(2 answers)
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkState(ZLjava/lang/String;Ljava/lang/Object;)
(5 answers)
Closed 2 years ago.
Using clj-webdriver with seleniumhq and chromedriver(86) and when test starts I still get this issue.
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.collect.ImmutableList.toImmutableList()Ljava/util/stream/Collector;
at org.openqa.selenium.chrome.ChromeOptions.asMap(ChromeOptions.java:292)
at org.openqa.selenium.MutableCapabilities.merge(MutableCapabilities.java:73)
at org.openqa.selenium.remote.DesiredCapabilities.merge(DesiredCapabilities.java:107)
at org.openqa.selenium.remote.DesiredCapabilities.merge(DesiredCapabilities.java:33)
at org.openqa.selenium.MutableCapabilities.setCapability(MutableCapabilities.java:96)
...
It says it cannot find method from com.google.guava but I can see that guava-25.0-jre.jar is fetched in project dependencies but it is somehow ignored.
Also weird thing is that from stacktrace ChromeOptions.asMap() is refering to line 292 in ChromeOptions.java but when I check that class there's no such line so it looks like it is refering to different version of selenium-chrome-driver but then again in deps there's 3.141.59 version.
Checked all the dependencies and cannot seem to find place where old guava or old selenium-chrome-driver should live.
Dependencies looks like:
:dependencies [
[org.seleniumhq.selenium/selenium-java "3.141.59"]
[org.clojure/clojure "1.10.1"]
[clj-webdriver "0.7.2" :exclusions [
[org.seleniumhq.selenium/selenium-server]
[org.seleniumhq.selenium/selenium-java]
[org.seleniumhq.selenium/selenium-remote-driver]
[com.codeborne/phantomjsdriver]]]
[org.seleniumhq.selenium/htmlunit-driver "2.44.0"]
[com.google.guava/guava "25.0-jre"]
[clj-http "3.10.3"]
[cheshire "5.10.0"]
[clj-time "0.15.2"]]
I spent on this like whole day and running out of ideas.
Any ideas why this error appears?
This question already has an answer here:
#karate How to pass parameter to a feature file in gatling simulation class?
(1 answer)
Closed 1 year ago.
I am trying to simulate a user scenario over an api using Gatling. I am a newbie to scala and gatling and would like to simulate a load scenario such that:
it starts with 0 users,
increase a load of 5 users in 10 seconds,
holds the user load for the next 10 seconds,
increase 5 more users over the next 10 seconds,
holds the user load for the next 10 seconds,
ramp down users from 10 to 0 over the next 10 seconds.
I am using karate feature files to define the api specifications.
Thanks for the help.
It should be possible by referring to the Karate docs and then the Gatling docs:
setUp(
create.inject(
rampUsers(5) during (10 seconds),
nothingFor(10 seconds),
rampUsers(5) during (10 seconds),
nothingFor(10 seconds),
rampUsers(0) during(10 seconds)
).protocols(protocol)
)
I have an i.mx7 som. I want to build a Yocto image which I can dd onto a usb stick to boot from. I believe that I want an hddimg image but cannot see how to create one (I have sdimg which works prefectly).
I would appreciate advice.
I have set IMAGE_FSTYPES to "hddimg" but get "ERROR: Nothing PROVIDES 'syslinux'"
The SOM is the Technexion i.MX7. Layers are:
layer path priority
=======================================================
meta sources/poky/meta 5
meta-poky sources/poky/meta-poky 5
meta-oe sources/meta-openembedded/meta-oe 6
meta-multimedia sources/meta-openembedded/meta-multimedia 6
meta-freescale sources/meta-freescale 5
meta-freescale-3rdparty sources/meta-freescale-3rdparty 4
meta-freescale-distro sources/meta-freescale-distro 4
meta-powervault sources/meta-powervault 6
meta-python sources/meta-openembedded/meta-python 7
meta-networking sources/meta-openembedded/meta-networking 5
meta-virtualization sources/meta-virtualization 8
meta-filesystems sources/meta-openembedded/meta-filesystems 6
meta-cpan sources/meta-cpan 10
meta-mender-core sources/meta-mender/meta-mender-core 6
meta-mender-freescale sources/meta-mender/meta-mender-freescale 10
Nope, you certainly do not want an hddimg, as this is a mostly deprecated format for x86 systems. On ARM, you almost never want syslinux :-)
Usually your SOM comes with a Board Support Package in the form of a layer, which includes the MACHINE definition which in turn defines the IMAGE_FSTYPE that this machine likes for booting. If in doubt, consult the manual or ask your vendor.
Having said that, if you specify SOM and layers in use we can have a look if publicly accessible, but without those details it is impossible to give a proper answer.
This question is not programming related but related to one of test case design the technique. State Transition Diagram technique provides Test coverage by identifying test conditions via N-1 switch transitions.
I am confused about how to calculate the 0-switch and 1-switch coverage.
Adding screenshot of an example. Can anyone please explain how this can be solved?
Thank you in Advance.
The number of 0-switch from a state equals to the number of the transitions of length 1 starting from that state. In this case you have:
ACT-ACT;
ACT-ACC;
ACT-DIS;
ACT-CLO.
So, from Activated there are 4 transitions of length 1.
1-switch coverage from a state equals to all the transitions of length 2 starting from that state. You can build up from what you found in the 0-switch case, knowing which states you can reach from Activated in 1 transition. Just compute all the 0-switch transitions from each of these 4 states:
ACT: (as computed earlier) ACT-ACT; ACT-ACC; ACT-DIS; ACT-CLO -> 4;
ACC: ACC-ACT; ACC-CLO -> 2;
DIS: DIS-ACT; DIS-CLO -> 2;
CLO: CLO-DIS; CLO-ACT; CLO-REM; CLO-ACC -> 4.
In total, there are 12 1-STs.
But this is without considering the constraints in the second part of the exercise description.
"If a claim in state Accepted has been Closed it can only
be restored to the same state Accepted." -> it does not matter for the exercise, since we start from the state Activated.
"If a claim in state Activated has been Closed it can only be
restored to state Activated." -> this constraint rules out ACT-CLO-ACC.
So, in the end, you have 11 valid 1-STs.
There are 4 0-Switch transitions (states that you can reach with 1 leap from the Activated status):
Activated
Accepted
Disputed
Closed
There are 12 1-Switch transitions (states that you can reach with 2 leaps from the Activated status), however only 10 of them are valid:
Activated - Activated
Activated - Accepted
Activated - Disputed
Activated - Closed
Accepted - Activated
Accepted - Closed
Disputed - Activated
Disputed - Closed
Closed - Activated
Closed - Removed
The final restriction indicates that only Closed - Activated can be done, so Closed - Disputed, and Closed - Accepted do not count.
Addendum for Marco answer<<
Total solution for 1-switch is 9.
You rule out
ACT-CLO-ACC (as Marco said due to second restriction)
but You also rule out
ACT-CLO-REM (This one nobody excluded)
ACT-CLO-DIS (as Afner noted)
This question already has answers here:
How to show SQL queries run in the Rails console?
(8 answers)
Closed 8 years ago.
My terminal used to display SQL table insert statements (as it should by default), and now it doesn't. Everything else - for example, GET requests, or local server startup info, or job completion notifications - appear as normal.
For the life of me, I can't figure out what the problem could be. I've been searching for a long time and can't figure out any reason this would happen. Do you have any ideas to point me in the right direction?
Put this in either in your .irbrc or .pryrc in your home directory
if defined?(Rails) && !Rails.env.nil?
puts '... ActiveRecord and ActiveResource Logger set to STDOUT'
logger = Logger.new(STDOUT)
ActiveRecord::Base.logger = logger
ActiveResource::Base.logger = logger
end
You should start to see the sql statements executing in the rails console.
Hope this helps