Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Message in hooks should appear in the report #134

Closed
sswaroopgupta opened this issue Jun 13, 2018 · 1 comment
Closed

Message in hooks should appear in the report #134

sswaroopgupta opened this issue Jun 13, 2018 · 1 comment

Comments

@sswaroopgupta
Copy link
Contributor

Expected behavior
When Gauge.Messages is written in the hooks, it should appear in html-report

Actual behavior
Only messages written in before and after step are available

Steps to replicate

  • Create a gauge-chsarp project
  • Add implementation
        [BeforeSuite]
        public void BeforeSuite(ExecutionContext context)
        {
            Specification specification = context.CurrentSpecification;
            GaugeMessages.WriteMessage("BSuite"+context.CurrentSpecification.Name);
        }

        [AfterSuite]
        public void AfterSuite(ExecutionContext context)
        {
            GaugeMessages.WriteMessage("ASuite" + context.CurrentScenario.Name);
        }
        [BeforeScenario]
        public void BeforeScenario(ExecutionContext context)
        {
            GaugeMessages.WriteMessage("BScenario"+context.CurrentScenario.Name);
        }
        [BeforeSpec]
        public void BeforeSpec(ExecutionContext context)
        {
            GaugeMessages.WriteMessage("BSpec" + context.CurrentScenario.Name);
        }
        [AfterScenario]
        public void AfterScenario(ExecutionContext context)
        {
            GaugeMessages.WriteMessage("AScenario" + context.CurrentScenario.Name);
        }
        [AfterSpec]
        public void AfterSpec(ExecutionContext context)
        {
            GaugeMessages.WriteMessage("ASpec" + context.CurrentScenario.Name);
        }
        
        [BeforeStep]
        public void BeforeStep(ExecutionContext context)
        {
            GaugeMessages.WriteMessage("BStep" + context.CurrentScenario.Name);
        }

        [AfterStep]
        public void AfterStep(ExecutionContext context)
        {
            GaugeMessages.WriteMessage("AStep" + context.CurrentScenario.Name);
        }
  • Run the specs
  • Open the report

Only the before and after step messages are displayed

Version

Gauge version: 0.9.9
Commit Hash: 8db625f

Plugins
-------
csharp (0.10.4.nightly-2018-05-29)
@sswaroopgupta
Copy link
Contributor Author

Fixed in

Gauge version: 1.0.1.nightly-2018-08-01
Commit Hash: 6aa1ce2

Plugins
-------
csharp (0.10.5.nightly-2018-08-02)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant