質問

I have written a couple of fixtures that I have been able to manage to run too so far.however,I'm stuck on this attempt and I don't have a clue as to where I'm going wrong.

My test wiki looks like this

Pattern Engine Report Page Test

start date  end date    start time  end time    submit result ?
x            x            x                x                false
x            x            x                0                false

The execution actually leads to errors (trivial) I should add since the values set in the decision table are not being injected via the respective setter methods. enter image description here

The Fixture code is as follows

package com.fit.fixtures;

import org.apache.log4j.Logger;

import com.fit.PatternEngineMainPageScenario;

public class PatternEngineReportPageTest {

    public PatternEngineReportPageTest() {
        log.debug("Created instance of test class ");
    }

    private static final Logger log = Logger.getLogger(PatternEngineReportPageTest.class);

    private String appName;

    private String startDate;

    private String endDate;

    private String startTime;

    private String endTime;

    public void setAppName(String applicationName) {
        this.appName = applicationName;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String submitResult() {
        log.debug("Starting to test");
        System.out.println("Starting to test");
        PatternEngineMainPageScenario launchPageScenario = new PatternEngineMainPageScenario();
        return String.valueOf(launchPageScenario.launchMainPage("", startDate, endDate, startTime, endTime));
    }


}

The fixture as you can see is devoid of too much logic and most of it is in the PatternEngineMainPageScenario class.

My concern is the bare minimum logic of just calling the respective setters is not happening as expected.Please help

役に立ちましたか?

解決

It looks like your test is split into 2 tables, so 'start date' is treated like another fixture name. Make sure there's no blank line between the test table rows.

|pattern engine report page test|
|start date|etc|
|etc|etc|
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top