Cypress: Whoops, there is no test to run.

Created on 20 Nov 2017  路  7Comments  路  Source: cypress-io/cypress

  • Operating System: Ubuntu 16.04
  • Cypress Version: 1.0.3
  • Browser Version: Chrome Version 61.0.3163.91 (Official Build) (64-bit)

Hi,
Why the following test gives me Whoops, there is no test to run. page?
```javascript
describe('Existance', function(){
it('Nav is visible', function(){
cy.visit('https://medium.com/m/signin')
cy.get('[data-action="twitter-auth"]').click()
cy.wait(5000)
cy.get('input[name="session[username_or_email]"]').type("")
cy.get('input[name="session[password]""]').type("")
cy.get('input[type="submit"]').click()
cy.wait(5000)
cy.visit('https://medium.com/me/stories/public')
cy.get("nav").should('be.visible')
});
})

馃槼 whoops there is no test to run question

Most helpful comment

Well we have an extension for Medium, and I have to go to medium to make some tests while I am logged in, how I should do that? If I requested the page it will redirect to the login page.

All 7 comments

It looks like you are trying to visit an external site for oauth access. This is a common anti pattern with workarounds. You should read our best practices guide on this.

https://docs.cypress.io/guides/references/best-practices.html#Visiting-external-sites

Also keep in mind Cypress is not a general automation tool. It鈥檚 built for testing apps under tor control.

https://docs.cypress.io/guides/references/trade-offs.html#

It looks like you are trying to visit an external site for oauth access. This is a common anti pattern with workarounds. You should read our best practices guide on this.

https://docs.cypress.io/guides/references/best-practices.html#Visiting-external-sites

Also keep in mind Cypress is not a general automation tool. It鈥檚 built for testing apps under tor control.

https://docs.cypress.io/guides/references/trade-offs.html#

Also might want to check out our logging in recipes.
https://docs.cypress.io/examples/recipes/logging-in-recipe.html#

Well we have an extension for Medium, and I have to go to medium to make some tests while I am logged in, how I should do that? If I requested the page it will redirect to the login page.

I also ran into the same problem.

Here is my case: I want to try Cypress on my local machine to test web app deployed to company integration test machine. This app is accessed via URL with cy.visit(URL), which is unfortunately considered by Cypress a third party website. Yet, I or the company indeed has full control of the app.

Won't this limit the range of user for Cypress? It looks to me that only test engineer who has access to code and successfully deployed locally can fully unleash Cypress's power.

@eric07109 you'll need to provide your test code and what it is you're doing. Your issue is likely very different from the one posted.

Here is my case:

describe('Login', function(){
    it('Login', function(){
        cy.visit('URL')
        cy.get('#j_username').type('account')
        cy.get('#j_password').type('password')
        cy.get('input[type=submit]').click()
        cy.url().should('include', '/index.req')
    })
})

Was this page helpful?
0 / 5 - 0 ratings