How do I get intern.js 2.1 to work with the new functionalSuites command line argument to intern-runner? - intern

if I do project>node node_modules\intern\bin\intern-runner config=my/config functionalSuites=mySuite it just hangs. If I omit functionalSuites, it works perfecto.

This was due to a bug in how Intern 2.1.0 handled the functionalSuites property. Intern has always assumed functionalSuites is an array. Specifying only a single instance of functionalSuites on the command line resulted in a string value (rather than an array) for functionalSuites in Intern, which would break the test runner.
The problem is fixed in Intern 2.1.1.

Related

Using AfterEach with different file module in NodeJS getting different values

I'm quite new in using Node JS, and I have been working on a test script that take screenshots whenever a test fails. And I'm trying to do this without the use of Jasmine reporter. I tried to use this approach instead Check if test failed in 'afterEach' of Jest without jasmine, however, I'm working with different files I have a file fail_test.spec.js that is used as my main file, and a test_fail1.js as another testscript file. Here is what happening, my test on fail_test.spec.js works fine with the use of AfterEach, just like in the link, it gives me "true" value if the test passed and "false" value when the test fails and it performs screenshot. The problem is the test_fail1.js is also being check by the AfterEach and it constantly gives of a "false" value even if the test passed. I do intend to use AfterEach with the test_fail1.js and on other tests in the future. So my questions are:
Why does the test_fail1.js only gives of constant "false" value?
Is there any work around with this? Because I just only need to know the status of the test in every testscripts within or with other files (ex.fail_test1.js, fail_test2.js, and so on)

Karate - Cucumber reports - How can I get cucumber to generate a unique .html report file each time I run a build [duplicate]

I have recently upgraded to version 1.0.0 from 0.9.6 and noticed that the generated karate-summary.html file, it doesn't display all the tested feature files in the JUnit 5 Runner unlike in 0.9.6.
What it displays instead was the last tested feature file only.
The below screenshots are from the provided SampleTest.java sample code (excluding other Tests for simplicity).
package karate;
import com.intuit.karate.junit5.Karate;
class SampleTest {
#Karate.Test
Karate testSample() {
return Karate.run("sample").relativeTo(getClass());
}
#Karate.Test
Karate testTags() {
return Karate.run("tags").relativeTo(getClass());
}
}
This is from Version 0.9.6.
And this one is from Version 1.0.0
However, when running the test below in 1.0.0, all the features are displayed in the summary correctly.
#Karate.Test
Karate testAll() {
return Karate.run().relativeTo(getClass());
}
Would anyone be kind to confirm if they are getting the similar result? It would be very much appreciated.
What it displays instead was the last tested feature file only.
This is because for each time you run a JUnit method, the reports directory is backed up by default. Look for other directories called target/karate-reports-<timestamp> and you may find your reports there. So maybe what is happening is that you have multiple JUnit tests that are all running, so you see this behavior. You may be able to over-ride this behavior by calling the method: .backupReportDir(false) on the builder. But I think it may not still work - because the JUnit runner has changed a little bit. It is designed to run one method at a time, when you are in local / dev-mode.
So the JUnit runner is just a convenience. You should use the Runner class / builder for CI execution, and when you want to run multiple tests and see them in one report: https://stackoverflow.com/a/65578167/143475
Here is an example: ExamplesTest.java
But in case there is a bug in the JUnit runner (which is quite possible) please follow the process and help the project developers replicate and then fix the issue to release as soon as possible.

Capybara 3 normalize whitespace

I've just updated Capybara to version 3.13.
I've noticed that you can add an option to assertions using, normalize_ws: true. For my existing test packs, updating every assertion to use this would be time consuming.
Can this be set in the env.rb file of your cucumber project to be invoked by default?
You can set Capybara.default_normalize_ws = true, although you should start updating your assertions to match what a user actually sees because the option will probably go away in Capybara 4

Absolute path not shown properly in Jmeter with WDS

For a scenario, I am using Jmeter with WebDriver Sampler. So for uploading a file, since I need to run in Jenkins, I have to pass the absolute path of file. To get the current path I defined following command in User Defined variable.
${__groovy(import org.apache.jmeter.services.FileServer; FileServer.getFileServer().getBaseDir();)}${__groovy(File.separator)}
When I log this its working fine. Its showing the file path correctly. But when I use this in WDS and try to log. I am getting the file path with all the backslash removed and unnecessary spaces.
C:\ram\file\part1\renamed.txt
It has to be printed like this, but instead
cramfilepartrename d
It prints like this. Any idea what can be the issue ?
I cannot reproduce your problem using latest versions of JMeter and WebDriver Sampler:
Make sure to upgrade to JMeter 4.0 (or whatever is the latest version available at downloads page)
Make sure to upgrade WebDriver Sampler plugin to version 2.3 using JMeter Plugins Manager
Make sure to use WDS.log shorthand to print the variable value

wireshark coredumps during load

I have a wireshark dissector plugin.
I also have a wireshark installed from apt-get.
The wireshark loads fine without the plugin inserted in the right place.
When I include the plugin .so file and try to run wireshark, I get the following error:
$ wireshark
08:23:45 Err register_subtree_array: subtree item type (ett_...) not -1 ! This is a development error: Either the subtree item type has already been assigned or was not initialized to -1.
Trace/breakpoint trap (core dumped)
I tried understanding the problem. It says the subtree was already assigned (I'm assuming assigned an ett value) or was not initialized with -1. there are 3 files in my plugin where the API is called and I checked the values of ett[] being supplied to the API in each of these places. They are all initialized to -1.
Stuck in a roadblock. Any suggestion would be helpful.
Also, I do not understand where wireshark dumps the core. I could not find any core.
Any idea about this?
Generally, if you want to insert a plugin into a program, you have to ensure that the library API that the plugin was compiled against is the same as that provided by the program.
Unless wireshark provides documented versioning in its library API, this means that you have to have the plugin compiled against the same version of wireshark that you intend to use it with. So, if you compile your wireshark or the plugin yourself, you should compile the other as well. If you get your plugin in binary form, you should get your wireshark also from exactly the same place, otherwise you may not know if the two are compatible or not. If you only get a core dump when you insert the plugin, that's a strong indication that the two may not be compatible.
register_subtree_array: subtree item type (ett_...) not -1
...
there are 3 files in my plugin where the API is called and I checked the values of ett[] being supplied to the API in each of these places. They are all initialized to -1.
To which API are you referring? You must not call register_subtree_array() on any particular ett_ array more than once; if you're calling it twice, the first call will cause the ett_ values in the array to be set to values different from -1, so the next call will fail with that error.

Resources