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

Please share example how to use for flutter integration test #12

Open
amitkumar-qa opened this issue Aug 23, 2022 · 2 comments
Open

Please share example how to use for flutter integration test #12

amitkumar-qa opened this issue Aug 23, 2022 · 2 comments

Comments

@amitkumar-qa
Copy link

amitkumar-qa commented Aug 23, 2022

Hi Team ,
Below is an example of integration test using latest integration test package:
I have a test in testrail for "User login with invalid user name" with testrailid=C3456 and projectid=9
I want to mark this test pass/fail based on the execution result of below test mentioned in testWidgets.

Please share how i can do that. I already checked the package provided by you , but facing difficulty how to use it. Please assist.

`void main() {
HomeRobot homeRobot;
LoginRobot loginRobot;
final commonHelper = CommonHelper();

group('e2e test', () {

testWidgets('**User login with invalid user name**',
    (WidgetTester tester) async {
  homeRobot = HomeRobot(tester);
  loginRobot = LoginRobot(tester);
  await commonHelper.runApp(tester);
  await loginRobot.enterEmail("username");
  await loginRobot.enterPassword("password");
  await loginRobot.clickSignIn();
  expect(find.text("Please enter a valid email address."), findsOneWidget);
});

});
}`

Cheers
Am

@amitkumar-qa
Copy link
Author

@Josiassejod1 @ervuks Please assist here, awaiting your response.

Cheers
Am

@ervuks
Copy link
Contributor

ervuks commented Aug 28, 2022

Getting started section explains quite clearly how to setup everything up.
First, you have to define the TestRail configuration.

TestRail.config(
  username: 'USERNAME',
  password: 'PASSWORD',
  /// The URL that points to the test rail server => https://example.testrail.com
  serverDomain: 'https://YOUR_SERVER.testrail.com',
)

Once you have the config in place, you should be able to access API directly.
Flow should be as follows:

  • Create a new test run with needed cases. You can find the reference here
  • Update case status after each executed case within a created test run.

Rest is your technical implementation, where and how you implement it. You can use the setUp() and tearDown() functions to build logic around it.

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

No branches or pull requests

2 participants