Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6063695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:11:49+00:00 2026-05-23T09:11:49+00:00

I’m currently writing some functional tests, and I started wondering what’s the best philosophy

  • 0

I’m currently writing some functional tests, and I started wondering what’s the best philosophy between these two.

Situation

My application has some secured page, that need the user’s group to have the right credentials to have access. These user are split into 2 groups : the ‘collaborator group’, and the ‘accountable group’. Credentials are given to the groups.

Possible philosophies

Solution 1: Tests the credentials a.k.a. Test the features.

For each secured page, I test the
access with 2 users : one with the
right credential, and only this one,
and one without the right credential.

Pros: Tests only the fact that the page is secured against a specific credential

Cons: Doesn’t test the “final” application behavior, as wanted (and user) by the client.

Solution 2: Test the groups a.k.a. test the requirements

For each secured page, I test the
access with a user of each group, and
check that only the allowed groups
gain access to the secured page.

Pros: Tests the “final” application behavior, as wanted (and user) by the client.

Cons:

  • Tests are tieds with the tests fixtures
  • Tests will have to change if the business rules changes or if more groups are created.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:11:50+00:00Added an answer on May 23, 2026 at 9:11 am

    I think the second solution is the good one. The credentials will be tested as far as they are associated with a group.

    Pros: Tests the “final” application behavior, as wanted (and user) by the client.

    This is the most important part. Functional tests aims to test the final application in every possible cases. If you want to test the fact that your credentials have the same behavior with a user or a group, you’d better use unit tests.

    Cons: Tests will have to change if the business rules changes or if more groups are created.

    Your tests cases will always have to be updated if the business of your application changes. As you do with your unit tests. If your modify the code of a function, you check if your unit tests are still able to control each case. It’s the same way with functional tests.

    Maintaining your tests (and the fixtures they need to run) is a very tedious task, but it’s the only way to ensure you’re code is strong.

    Hope it helped.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am currently running into a problem where an element is coming back from
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I've tracked down a weird MySQL problem to the two different ways I was
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am writing an app with both english and french support. The app requests

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.