Any dataprovider available for specflow - mstest

Looking for data provider as external file like CSV/Excel, similar to MsTest Unit testing framework. Anybody tried or Any implementation available?

I would wrote a separate method, which would read data from csv/excel file in needed order. And added this method in the step, to call it after from Scenario.
Also, in non-free SpecFlow+ version has plugin for reading from Excel.

Related

SonarQube Generic Execution Report is ignored

The whole morning I have been trying to setup e2e tests reporting via SonarQube's Generic Execution, by using the Generic Test Data -> Generic Execution feature.
I created a custom xml report that gets added to the scan properties like this:
sonar.testExecutionReportPaths=**/e2e-report.xml
So far, SonarQube seems to completely ignore this property and I no attempt to parse the file in the logs. Has anyone made it work?
These are links by Sonar about the Generic Execution feature:
https://docs.sonarqube.org/display/SONAR/Generic+Test+Data
https://github.com/SonarSource/sonarqube/blob/master/sonar-scanner-engine/src/main/java/org/sonar/scanner/genericcoverage/GenericTestExecutionSensor.java
This is a SonarQube 6.2+ feature. Make sure to use an appropriate SonarQube version.
In addition sonar.testExecutionReportPaths does not allow matchers (like *).
Please provide relative or absolute paths, comma separated.
See also:
The official documentation of the Generic Test Data feature
The source code, that looks up the generic execution files

Why do the reading of local property files in JMeter require a plugin?

I was earlier looking for a way to read properties from a project-local file for use in a JMeter Test Plan.
I found a plugin that allows you to do this, but I still don't understand why this functionality isn't just supported natively by the standard distribution of JMeter. Is there a reason for this?
As described in the link you provide, the standard way to override properties files is to put them in user.properties.
Note you can also pass properties through command line option:
-q
as per http://jmeter.apache.org/usermanual/get-started.html#options
If that does not suit your requirement could you give more details about it ?

Store data in selenium webdriver

Im looking for a way to store data in selenium for use in future tests.
Im using jenkins, maven + selenium and testng.
How can i store some data, lets say i want to run test, get some data from website (weather forecast). Store it somewhere and next day run test to check if forecast match todays weather.
I can store it in txt file, and parse by regex but im sure there is better way to do it?
You have to consider what "selenium webdriver" is in this context. It is a Java app. It "exists" only when it is running. Once the run stops, it is purged from memory, including all data it held. If you are using JUnit or TestNG (as you specified), then this data is purged even more frequently: after every the class.
To accomplish what you are asking, you will need something external to your tests. You can certainly utilize a txt file as you suggested. A spreadsheet might do for your purposes. Most applications utilize an entire database.
You also mentioned Jenkins. This will make the external storage a more interesting problem, as Jenkins often purges the current working directory before each run.

Neo4j native api data not picked by Spring Data Repos

I've got some data that has been pumped into a neo4j instance using the native api. The same instance is used by an app backed by Spring data graph. The repositories fail to find the data. I'm assuming that this is an issue due to indexes and/or missing properties.
When the data is pumped in the following properties are set:
node.setProperty("__type__", "com.x.x.Class");
Index is set as follows:
Index<Node> typeIndex = indexManager.forNodes("__types__");
typeIndex.add(node, "className", "com.x.x.Class");
Any clues/help is appreciated.
imamc,
I'd appreciate it if you posted a simple test that reproduces the problem, preferably to https://groups.google.com/forum/?fromgroups#!forum/neo4j
But off hand, what you said makes sense, I do not have any other tips. But if we get some code/ test to work on, we might be able to help.
Lasse

Something similar to NUnit TestCaseSource in Visual Studio unit testing

Is there anything similar to NUnit TestCaseSource attribute in Visual Studio unit testing? The closest solution I found was to use a DataSource. But I don't want to store my test case parameters in a data source.
Datasource is one option to take the test input. You can save your test data in many file format (xml, xls or in sql db)
But if you don't want to store your test data, then use TestInitialize() attribute in any method that will execute before any of your test cases. Save all your test data run time in xml,xls or in sql db through this method and then using datasource use it in your test cases.
Here is msdn link for VSTS unit test. Hope this will help you.

Resources