Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jython scenarioResult parameter in @After hook #582

Closed
lggroapa opened this issue Sep 5, 2013 · 1 comment
Closed

Jython scenarioResult parameter in @After hook #582

lggroapa opened this issue Sep 5, 2013 · 1 comment

Comments

@lggroapa
Copy link
Contributor

lggroapa commented Sep 5, 2013

I might be doing something wrong but i have no ideea how to get acces to the scenarioResult object in the @after hook method in jython steps.

I was looking at the jython code to investigate the problem and in JythonHookDefinition I see the scenarioResult being passed to the JythonBackend

backend.executeHook(hookDefinition, new Object[]{scenarioResult});

But in the JythonBackend the parameter isn't passed inside pyArgs

public void executeHook(PyInstance hookDefinition, Object[] scenarioResults) {
PyObject[] pyArgs = new PyObject[1];
pyArgs[0] = pyWorld;
hookDefinition.invoke("execute", pyArgs);
}

mfellner added a commit that referenced this issue Sep 6, 2013
# By Aslak Hellesøy (9) and others
# Via Dmytro Chyzhykov (2) and others
* master:
  [TestNG] Java Calculator TestNG example project - #579 issue.
  [Jython] Access to scenario in Before and After hooks. Closes #582.
  Scenario Outlines: Replace tokens in the names of the generated "Example Scenario"s.
  Change some remaining Cucumber.Options to CucumberOptions
  No longer used
  No longer used
  master is SNAPSHOT
  Java Calculator TestNG example project.
  Enable Wicket example, using HtmlUnitDriver so it runs on Travis. Upgraded maven plugins.
  is deprecated in favour of . Closes #549
  Disable wicket example for now
  Updated History.md with Android improvements. Ref #547 and #574.
  Attribution. Fix broken test. Closes #568
  Enable wicket example. Removed incorrect comment about cargo requiring Java 7. It does not. (Jetty 9 does, but we're on 8 now).
  #568 Inherit Information of @Cucumber.Options
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
mpkorstanje pushed a commit that referenced this issue Oct 4, 2019
The implementation is a little ghetto. I tried to get the arity
of the hook function using inspect.getargspec, but couldn't get
it to work. This implementation will most likely be sufficient though.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant