Serenity tutorial for testing

Multi tool use
Multi tool use


Serenity tutorial for testing



http://serenity-bdd.info/docs/articles/screenplay-tutorial.html


http://serenity-bdd.info/docs/articles/screenplay-tutorial.html



Im doing the above tutorial and im in



4.2.1. Implementing a simple business task class



Now Im stuck in:



The only thing we do need to do is to add some Serenity instrumentation to the instance using the net.serenitybdd.screenplay.Tasks.instrumented() method, so that the task and underlying actions will appear in the Serenity reports:


package task;

import net.serenitybdd.screenplay.Actor;
import net.serenitybdd.screenplay.Task;

public class StartWith implements Task {

@Override
public <T extends Actor> void performAs(T actor) {
}

public static StartWith anEmptyTodoList() {
return instrumented(StartWith.class);
}
}



This is my code and Im getting error in instrumented


instrumented



How to fix that error?



Im using netbeans. When I do right click > fix imports. Still not fix



Update


Update



Added import



import static net.serenitybdd.screenplay.Tasks.instrumented;



Still same error


public class StartWith {

public static StartWithAnEmptyList anEmptyTodoList() {
return Instrumented(StartWithAnEmptyList.class);
}

public static StartWithATodoListContaining aTodoListContaining(String... todos) {
return Instrumented.instanceOf(StartWithATodoListContaining.class)
.withProperties(Lists.newArrayList(todos));
}
}



Im just wondering why in return


Instrumented.instanceOf(StartWithATodoListContaining.class)
.withProperties(Lists.newArrayList(todos));



I have no error for Instrumented


Instrumented



Error :



cannot find symbol
symbol: method Instrumented(Class)
location: class StartWith









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

fAfXGIDABnKx86d s1L79HR1ts mV,3kTI XI9U61TEPBOQ2T9rXVg4,DBGy7VJBVjLL4,Gp5Nc,pAmTZertg8UVp
PXb1z07YQusW1Z7WzI,wRUi90pPVSU6C9oFsmoAKcR2DA2SC234D WBuNP

Popular posts from this blog

Rothschild family

Boo (programming language)