Accelerator-based light sources are extremely useful machines for investigating matter on a microscopic level, yet their capability for time-resolved research is limited by the femtosecond-scale duration of their radiation pulses. Attosecond beams could enhance these capacities enabling the measurement of most outer shell electron dynamics in molecular and atomic systems. However,one of the main challenges in this direction remains the generation of attosecond-scale electron bunches which can be used for ultrashort radiation generation or as probes themselves.The research presented in this thesis tackles this issue from two angles. First, mechanisms for ultrashort electron beam generation and acceleration in laser wakefield accelerators - as promising,compact accelerator systems - are investigated through particle-in-cell simulations. Bothan optimised electron plasma injector, using upramp-assisted self-injection, and an external injection setup with the plasma stage as an energy booster to a conventionally accelerated beam are capable of providing electron bunches of few hundred attoseconds duration. The externally injected beams are found to be limited in duration, but preserve well the initial high beam quality for energies up to gigaelectronvolts, while in self-injection high beam currents and ultrashort duration can be achieved, yet at some cost to beam quality and stability. As a second research branch, longitudinal beam profile diagnostics with sub-femtosecond resolution are examined as possible means for measuring such ultrashort electron beams. A first proof-of-principle experiment of a novel streaking device is presented and compared with measurements with anX-band radiofrequency deflecting cavity. Additional computational and theoretical studies provide insights into the possibilities and challenges to apply this new diagnostic technique to sub-femtosecond electron beams from conventional and novel accelerators.