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

JBossDev suite: using @Parameters - problems #133

Closed
yaroslavherasym opened this issue Nov 22, 2011 · 4 comments
Closed

JBossDev suite: using @Parameters - problems #133

yaroslavherasym opened this issue Nov 22, 2011 · 4 comments

Comments

@yaroslavherasym
Copy link

RedHat JBoss Developer Studio,
TestNG (Certified) 1.0.2.v20111111-0440-H1078-GA com.jboss.jbds.testng.feature.feature.group
TestNG 5.14.6.20110119_1050 org.testng.eclipse.feature.group

I'm running TestNG suite by using testng.xml file

My code looks like:

@parameters({"addPersonCSVFile"})
@test (groups = {"Functional"})
public class addPersonPositiveTestQA (String filePath) {...}

I know for sure that my test suite is driven by testng.xml (because if I change the group name - it will run another group-set-scripts).

In my case I have an error:

[javac] /home/yherasym/workspace/Services/PersonFacade1.0/src/syscon/arbutus/product/services/personFacade/test/addPersonPositiveTestQA.java:30: '{' expected
[javac] public class addPersonPositiveTestQA (String filePath) {
[javac] .......................................................^
[javac] 1 error

So, looks like the parameter from testng.xml is not linked to "filePath".

I see some @parameters issues prior testng version 6.x in Change.log.

So, does TestNG ver. 5.14.6.20110119_1050 cover those issues?

@cbeust
Copy link
Collaborator

cbeust commented Nov 22, 2011

This is a javac error, it has nothing to do with TestNG. Double check your source file for an extra {.

@cbeust cbeust closed this as completed Nov 22, 2011
@yaroslavherasym
Copy link
Author

  1. If I do not use @parameters testng feature and my code looks like:

@test (groups = {"Functional"})
public class addPersonPositiveTestQA {...}

I do not have any errors and my scripts work as expected.

  1. If I add @parameters but do not specifying (String filePath) - my code looks like:

@parameters({"addPersonCSVFile"})
@test (groups = {"Functional"})
public class addPersonPositiveTestQA {...}

I have an java error - cannot find symbol class Parameters
[javac] /home/yherasym/workspace/Services/PersonFacade1.0/src/syscon/arbutus/product/services/personFacade/test/addPersonPositiveTestQA.java:30: cannot find symbol
[javac] symbol: class Parameters
[javac] @parameters({"addPersonCSVFile"})

  1. If I using @parameters TestNG feature - It causes me the error (see Description).

Please count all provided evidences.

@cbeust
Copy link
Collaborator

cbeust commented Nov 22, 2011

"cannot find symbol class Parameters"

Seriously?

Again: it's a javac error, and it's telling you that you forgot to import that class.

Please spend some time reading a Java tutorial, it will save you a lot of time down the line.

@yaroslavherasym
Copy link
Author

Thank you.

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

No branches or pull requests

2 participants