I cannot run Runner Cucumber Reports - selenium

I tried create a test reports. But I can not this case.
I tried research and fix this but I dont know what happens. Can you help me?
[1]: https://i.stack.imgur.com/JYgVj.png
[2]: https://i.stack.imgur.com/w5v5k.png
[3]: https://i.stack.imgur.com/8mzNd.png

In #CucumberOtions features should contain the path to your feature file like
#CucumberOptions(features = "src/test/resources/features/Feature.feature"
The .feature file usually is located in resources package
glue option in #CucubmerOptions should contain name of the packege with the stepDefinitions file:
glue = {"stepDefinitions"}

Related

Cypress - Why adding testfiles names in jsconfig.json file are not executing in order

I have added spec file names in jsconfig.json so that they can execute in order. But they are not executing in this order.
{
"include": ["./node_modules/cypress", "cypress/**/*.js"],
"testFiles":
[
"login.cy.js",
"create_course.cy.js",
"open_course.cy.js",
"create_training.cy.js",
"edit_pitch.cy.js"
]
}
With specPattern, you can add a String or Array of glob patterns of the test files to load. Unfortunately, you won't be able to add the spec files in an array-like you can do in cypress version < 10 with testFiles.
An alternate way would be to keep the spec pattern as ["cypress/e2e/**/*.cy.{js,jsx,ts,tsx}"] and then rename your spec files to include sequential numbers so that they are executed in that sequence.
01-login.cy.js
02-create_course.cy.js
03-open_course.cy.js
04-create_training.cy.js
05-edit_pitch.cy.js
A better way to execute specs in order is to import them into a parent spec.
This also means you can run them together in the Cypress test runner (a feature removed in Cypress v10)
all-spec.cy.js
// run this spec to run the following in sequence
import './login.cy.js'
import './create_course.cy.js'
import './open_course.cy.js'
import './create_training.cy.js'
import './edit_pitch.cy.js'

Would you like to replace the existing file was asked while extracting selenium-server-standalone jar file

After having downloaded the selenium-server-standalone-3.141.59 jar file from https://www.selenium.dev/downloads/, I tried to extract the files. During the extraction, a pop-up shows up saying:
"The following file already exists. C:\Selenium3\selenium-server-standalone-3.141.59\META-INF\LICENSE.txt
Would you like to replace the existing file [file 1 with 11.969 bytes modified on 02/11/2014 19:52] with this one [file 2 with 36.116 bytes modified on 25/04/2013 16:52]"
I then get to choose from options like 'Yes', 'Yes to all', 'No', 'No to all' etc. Why is this happening? I was expecting a normal extraction in which all files are simply extracted and no questions asked about whether to replace certain files or not. Is there a bug with this jar file?
Please see attached screenshot.
I was able to reproduce the error...
while trying to extract the contents of selenium-server-standalone-3.141.59.jar.
Solution
If your usecase is to use selenium-server-standalone-3.141.59.jar within a Java project, instead of extracting the selenium-server-standalone-3.141.59.jar you need to add the jar file as an External JAR in the JAVA BUILD PATH for your project within the IDE as follows:

New to Jython Need help extracting data from file

I am new to scripting and programing in general. I am trying to run WebSphere command line tool, wsadmin, and it keeps failing. I am looking for answers for 2 questions about the following code:
**import sys
import os
import re
execfile('wsadminlib.py')
appName = sys.argv[1]
configLocation = "/location/of/config/"
config_prop = open(configLocation + appName+"-Config.csv", "r")
for line in config_prop:
line = line.split(",")
print line**
I launch run the scripts in as wsadmin and from the command line is as follows:
>>>>./wsadmin.sh -lang jython -f deploy.sh param1
Questions:
The problem is that it fails on the "for line in config_prop" with AttributeError: getitem?
when I run this through python on the same machine, the code works. Just not when I run it through wsadmin tool?
Is there other ways to extract data from txt or csv with comma delimited and setting a variable for each word that is only one line long.
Issue has been resolved. the libraries used is 2.1 and the syntax i was using was post 2.2.

Ignore includes with #pycparser and define multiple Subgraphs in #pydot

I am new to stackoverflow, but I got a lot of help until now, thanks to the community for that.
I'm trying to create a software showing me caller depandencys for legacycode.
I'parsing a directory with c code with pycparcer, and for each file i want to create a subgraph with pydot.
Two questions:
When parsing a c file, the parser references the #includes, an i get also functions in my AST, from the included files. How can i know, if the function is included, or originaly from this actual file/ or ignore the #includes??
For each file i want to create a subgraph, an then add all functions in this file to this subgraph. I don't know how many subgraphs i have to create...
I have a set of files, where each file is a frozenset with the functions of this file
somthing like this is pssible?
for files in SetOfFiles:
#how to create subgraph with name of files?
for function in files:
self.graph.add_node(pydot.Node(funktion)) #--> add node to subgraph "files"
I hope you got my challange... any ideas?
Thanks!
EDIT:
I solved the question about pydot, it was quiet easy... So I stay with my pycparser problem :(
for files in ListOfFuncs:
cluster_x = pydot.Cluster(files, label=files)
for functions in files:
cluster_x.add_node(pydot.Node(functions))
graph.add_subgraph(cluster_x)
I can address the pycparser part. The preprocessor leaves #line directives that specify which file & line code came for, and pycparser consumes those. You can get that information from the AST it creates (see tests for an example).

Exporting product csv file with a scheduler in OpenERP v6.1

Is there a way to export the products to a csv file using a scheduler?
I tried the csv python package discussed in this link: ( The best way to export openerp data to csv file using python ) but it seems I miss something.
I take advantage of the export_data as stated and I point my scheduler to that method but when I run it, nothing happen so I don't know if it runs or not but the scheduler keeps running.
Thanks for replies.
I'm not an OpenERP (or Odoo) expert. With my current knowledge of Odoo I would get this started through ERPpeek along the lines of
erppeek [YOUR OPENERP DETAILS]
>>> l = model('product.product').browse([])
>>> import csv
>>> with open('test.csv', 'w') as fp:
a = csv.writer(fp, delimiter=',')
for prod in l: a.writerow(prod.read().values())
I'd further build it out into a script and then put the script in cron.
There are probably better, more standard Odoo-ish ways though.